diff --git a/src/util/u_debug.c b/src/util/u_debug.c index 79934e963c0..7282179c122 100644 --- a/src/util/u_debug.c +++ b/src/util/u_debug.c @@ -426,7 +426,7 @@ parse_debug_string(const char *debug, const char *s = debug; unsigned n; - for (; n = strcspn(s, ", "), *s; s += MAX2(1, n)) { + for (; n = strcspn(s, ", \n"), *s; s += MAX2(1, n)) { if (!n) continue; @@ -453,7 +453,7 @@ parse_enable_string(const char *debug, const char *s = debug; unsigned n; - for (; n = strcspn(s, ", "), *s; s += MAX2(1, n)) { + for (; n = strcspn(s, ", \n"), *s; s += MAX2(1, n)) { bool enable; if (s[0] == '+') { enable = true;