aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-09-01 20:23:30 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-09-01 20:23:30 +0300
commit25adaaa56e2e51a47a910a8d73452414619a2e53 (patch)
tree818c0180f0bbb49a7e54a162fab2bc6283c06652 /src
parentUpdated TODO. (diff)
downloadxz-25adaaa56e2e51a47a910a8d73452414619a2e53.tar.xz
Fix options parsing bug in xz.
xz used to reject "xz --lzma2=pb=2," while "xz --lzma2=pb=2,," worked. Now both work.
Diffstat (limited to 'src')
-rw-r--r--src/xz/options.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/xz/options.c b/src/xz/options.c
index 8ac67504..c52f61e0 100644
--- a/src/xz/options.c
+++ b/src/xz/options.c
@@ -68,11 +68,9 @@ parse_options(const char *str, const option_map *opts,
char *s = xstrdup(str);
char *name = s;
- while (true) {
+ while (*name != '\0') {
if (*name == ',') {
- if (*++name == '\0')
- break;
-
+ ++name;
continue;
}