From 9726f53e6008a17401081ea92eea0c4bda7d39a0 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 26 Sep 2023 11:55:03 +0200 Subject: [PATCH] conf: fix regex matching Reset skip to 0 for each value or else we won't be able to match 2 values when using regex. Fixes #3528 --- src/pipewire/conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pipewire/conf.c b/src/pipewire/conf.c index 10416c322..ac8c3c4cc 100644 --- a/src/pipewire/conf.c +++ b/src/pipewire/conf.c @@ -599,10 +599,11 @@ static bool find_match(struct spa_json *arr, const struct spa_dict *props) char key[256], val[1024]; const char *str, *value; int match = 0, fail = 0; - int len, skip = 0; + int len; while (spa_json_get_string(&it[0], key, sizeof(key)) > 0) { bool success = false; + int skip = 0; if ((len = spa_json_next(&it[0], &value)) <= 0) break;