mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
Allow extra commas in filter-specific options on xz command line.
This may slightly ease writing scripts that construct filter-specific option strings dynamically.
This commit is contained in:
parent
98f3cac1ad
commit
a35755c5de
1 changed files with 7 additions and 0 deletions
|
@ -69,6 +69,13 @@ parse_options(const char *str, const option_map *opts,
|
||||||
char *name = s;
|
char *name = s;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
if (*name == ',') {
|
||||||
|
if (*++name == '\0')
|
||||||
|
break;
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
char *split = strchr(name, ',');
|
char *split = strchr(name, ',');
|
||||||
if (split != NULL)
|
if (split != NULL)
|
||||||
*split = '\0';
|
*split = '\0';
|
||||||
|
|
Loading…
Reference in a new issue