mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-06 16:09:43 +00:00
pulse-server: improve module argument parsing
ticks also delimit strings. Unescape values. Fixes #1173
This commit is contained in:
parent
3ae2b9e189
commit
ab9023f752
|
@ -127,15 +127,19 @@ void module_args_add_props(struct pw_properties *props, const char *str)
|
|||
if (*p == '\"') {
|
||||
p++;
|
||||
f = '\"';
|
||||
} else if (*p == '\'') {
|
||||
p++;
|
||||
f = '\'';
|
||||
} else {
|
||||
f = ' ';
|
||||
}
|
||||
v = p;
|
||||
e = strchr(p, f);
|
||||
if (e == NULL)
|
||||
e = strchr(p, '\0');
|
||||
if (e == NULL)
|
||||
break;
|
||||
for (e = p; *e ; e++) {
|
||||
if (*e == f)
|
||||
break;
|
||||
if (*e == '\\')
|
||||
e++;
|
||||
}
|
||||
p = e;
|
||||
if (*e != '\0')
|
||||
p++;
|
||||
|
|
Loading…
Reference in a new issue