mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
json: ignore '\0'
We ignore '\0' chars as we use the string length to check for the end and the 0 chars might be inserted to parse the json in-place.
This commit is contained in:
parent
eb4a439488
commit
cc12755c6c
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ static inline int spa_json_next(struct spa_json * iter, const char **value)
|
||||||
goto again;
|
goto again;
|
||||||
case __STRUCT:
|
case __STRUCT:
|
||||||
switch (cur) {
|
switch (cur) {
|
||||||
case '\t': case ' ': case '\r': case '\n': case ':': case '=': case ',':
|
case '\0': case '\t': case ' ': case '\r': case '\n': case ':': case '=': case ',':
|
||||||
continue;
|
continue;
|
||||||
case '#':
|
case '#':
|
||||||
iter->state = __COMMENT;
|
iter->state = __COMMENT;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue