From: Jaroslav Kysela Date: Tue, 2 Dec 2025 09:59:19 +0000 (+0100) Subject: ucm: fix the DefineRegex issue where multiple variables were set to empty string X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=5ed27d8e89c2c2e7996ac3e28609393c08f034e4;p=alsa-lib.git ucm: fix the DefineRegex issue where multiple variables were set to empty string It is not required to set variables in undefined groups to empty string. Signed-off-by: Jaroslav Kysela --- diff --git a/src/ucm/ucm_regex.c b/src/ucm/ucm_regex.c index cef23626..8c257a0f 100644 --- a/src/ucm/ucm_regex.c +++ b/src/ucm/ucm_regex.c @@ -73,7 +73,7 @@ static int set_variables(snd_use_case_mgr_t *uc_mgr, const char *data, if (err < 0) return err; for (i = 1; i < match_size; i++) { - if (match[0].rm_so < 0 || match[0].rm_eo < 0) + if (match[i].rm_so < 0 || match[i].rm_eo < 0) return 0; s = extract_substring(data, &match[i]); if (s == NULL)