utils/u_debug: Fix parse of "all,<something else>

If debug string is something like "all,file=..." the all case would
never be executed, this can be fixed by comparing up to strlen("all").

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26882>
This commit is contained in:
José Roberto de Souza 2024-01-04 09:16:37 -08:00 committed by Marge Bot
parent a63f3fbdae
commit 0c42c79edf

View file

@ -423,7 +423,7 @@ parse_debug_string(const char *debug,
if (debug != NULL) { if (debug != NULL) {
for (; control->string != NULL; control++) { for (; control->string != NULL; control++) {
if (!strcmp(debug, "all")) { if (!strncmp(debug, "all", strlen("all"))) {
flag |= control->flag; flag |= control->flag;
} else { } else {