mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
json: check spa_json_get_string() return value correctly
It is only successful when > 0.
This commit is contained in:
parent
13c0cbb899
commit
68b31d37d9
2 changed files with 2 additions and 2 deletions
|
|
@ -183,7 +183,7 @@ static void load_quirks(struct spa_bt_quirks *this, const char *str, size_t len)
|
|||
if (spa_json_enter_object(&data, &rules) <= 0)
|
||||
spa_json_init(&rules, str, len);
|
||||
|
||||
while (spa_json_get_string(&rules, key, sizeof(key)-1)) {
|
||||
while (spa_json_get_string(&rules, key, sizeof(key)-1) > 0) {
|
||||
int sz;
|
||||
const char *value;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue