json: don't move past the end of a symbol

We can't move past the } or ] or we might miss the end of the
container. Now that we ignore \0 it is not a problem if the \0
is placed at the container boundary.
This commit is contained in:
Wim Taymans 2021-03-23 18:05:44 +01:00
parent b54af4ab0a
commit 34800dc019

View file

@ -112,7 +112,7 @@ static inline int spa_json_next(struct spa_json * iter, const char **value)
iter->state = __STRUCT;
if (iter->depth > 0)
goto again;
return iter->cur++ - *value;
return iter->cur - *value;
}
continue;
case __STRING: