spa: 0 means there is nothing left from from spa_json_next()

This commit is contained in:
Wim Taymans 2020-11-28 20:35:25 +01:00
parent 6e4c138238
commit 57a9e82f79

View file

@ -165,7 +165,7 @@ static inline int spa_json_next(struct spa_json * iter, const char **value)
static inline int spa_json_enter_container(struct spa_json *iter, struct spa_json *sub, char type)
{
const char *value;
if (spa_json_next(iter, &value) < 0 || *value != type)
if (spa_json_next(iter, &value) <= 0 || *value != type)
return -1;
spa_json_enter(iter, sub);
return 1;