From ddbfd88e74e1e80a3bf56c2e5b55a2bd7c53d92c Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 8 May 2023 12:52:10 -0500 Subject: [PATCH] vkd3d-shader/preproc: Lex whitespace and invalid characters in #include and #line directives. Avoid letting them fall through to the default rule. A syntax error will be emitted by the parser. --- libs/vkd3d-shader/preproc.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l index 7686e018..be4a0598 100644 --- a/libs/vkd3d-shader/preproc.l +++ b/libs/vkd3d-shader/preproc.l @@ -175,9 +175,9 @@ INT_SUFFIX [uUlL]{0,2} return T_NEWLINE; } -{WS}+ {} +{WS}+ {} [-()\[\]{},+!*/<>&|^?:] {return yytext[0];} -. {return T_TEXT;} +. {return T_TEXT;} %%