json: fix SPA_JSON_STATE

It should copy the state as well or else parsing will fail.
This commit is contained in:
Wim Taymans 2024-03-28 09:14:18 +01:00
parent 27ccf32030
commit 66b8cd3e32
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ static inline void spa_json_enter(struct spa_json * iter, struct spa_json * sub)
*sub = SPA_JSON_ENTER(iter);
}
#define SPA_JSON_SAVE(iter) ((struct spa_json) { (iter)->cur, (iter)->end, })
#define SPA_JSON_SAVE(iter) ((struct spa_json) { (iter)->cur, (iter)->end, NULL, (iter)->state, 0 })
/** Get the next token. \a value points to the token and the return value
* is the length. Returns -1 on parse error, 0 on end of input. */