mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-07 05:30:25 +01:00
util/u_debug: Ignore newlines in parse_*_string
We now use `parse_debug_string` to parse debug strings from files, which may have newlines in them. This change ensures that newline characters are ignored during parsing, a similar change was made to `parse_enable_string` for consistency. Signed-off-by: Mark Collins <mark@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
This commit is contained in:
parent
aaf8a8d968
commit
c76ef0898b
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue