mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
module: fix argument parsing
Skip spaces before the key. When the previous key ends with a ' or when there are 2 spaces between keys, the key includes the whitespace otherwise. See #2086
This commit is contained in:
parent
60b110ff93
commit
9ec782630c
1 changed files with 3 additions and 0 deletions
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <spa/utils/defs.h>
|
||||
#include <spa/utils/list.h>
|
||||
|
|
@ -143,6 +144,8 @@ void module_args_add_props(struct pw_properties *props, const char *str)
|
|||
const struct str_map *map;
|
||||
|
||||
while (*p) {
|
||||
while (*p && isspace(*p))
|
||||
p++;
|
||||
e = strchr(p, '=');
|
||||
if (e == NULL)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue