comparison lwlib/lw_cmdline.c @ 37:a5d4693483af

Fix hang while parsing long options
author lost@l-w.ca
date Fri, 01 Apr 2011 23:58:55 -0600
parents fdc11ef4115b
children 51c840679a0e
comparison
equal deleted inserted replaced
36:5325b640424d 37:a5d4693483af
428 break; 428 break;
429 } 429 }
430 lw_free(tstr); 430 lw_free(tstr);
431 tstr = argv[i] + cch; 431 tstr = argv[i] + cch;
432 cch = 0; 432 cch = 0;
433 i++;
433 434
434 common: 435 common:
435 /* j will be the offset into the option table when we get here */ 436 /* j will be the offset into the option table when we get here */
436 /* cch will be zero and tstr will point to the arg if it's a long option */ 437 /* cch will be zero and tstr will point to the arg if it's a long option */
437 /* cch will be > 0 and tstr points to the theoretical option, either within */ 438 /* cch will be > 0 and tstr points to the theoretical option, either within */