Fix options parsing bug in xz.

xz used to reject "xz --lzma2=pb=2," while
"xz --lzma2=pb=2,," worked. Now both work.
This commit is contained in:
Lasse Collin 2009-09-01 20:23:30 +03:00
parent 5f6dddc6c9
commit 25adaaa56e
1 changed files with 2 additions and 4 deletions

View File

@ -68,11 +68,9 @@ parse_options(const char *str, const option_map *opts,
char *s = xstrdup(str); char *s = xstrdup(str);
char *name = s; char *name = s;
while (true) { while (*name != '\0') {
if (*name == ',') { if (*name == ',') {
if (*++name == '\0') ++name;
break;
continue; continue;
} }