json: fix SPA_JSON_STATE
It should copy the state as well or else parsing will fail.
This commit is contained in:
parent
27ccf32030
commit
66b8cd3e32
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue