From 0a1f0df9d33e50b5a3119df7ca77424bd651c464 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 12 Aug 2021 14:28:59 +0200 Subject: [PATCH] vrend: Skip empty lines in count when printing shader It seems that the GLSL error messages don't count empty lines, so it is easier to locate errors when the empty lines are skipped in the output. Signed-off-by: Gert Wollny Reviewed-by: Rohan Garg --- src/vrend_strbuf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vrend_strbuf.h b/src/vrend_strbuf.h index 26296fa..6fd4e92 100644 --- a/src/vrend_strbuf.h +++ b/src/vrend_strbuf.h @@ -215,7 +215,8 @@ static inline void strarray_dump_with_line_numbers(struct vrend_strarray *sa) } else { len = strlen(line); } - vrend_printf("%4d: %.*s\n", lineno++, len, line); + if (len) + vrend_printf("%4d: %.*s\n", lineno++, len, line); } while (end); } }