aboutsummaryrefslogtreecommitdiff
path: root/opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'opts.c')
-rw-r--r--opts.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/opts.c b/opts.c
index 4a70a03..1ee1038 100644
--- a/opts.c
+++ b/opts.c
@@ -59,11 +59,13 @@ static int process_option_group(char *arg, struct opt opts[],
if (comma)
arg = comma + 1;
}
- if (!remove_one && prevcomma)
- *prevcomma = ',';
+ if (!remove_one) {
+ if (prevcomma)
+ *prevcomma = ',';
+ prevcomma = comma;
+ }
if (!comma)
break;
- prevcomma = comma;
}
return remove;
}