diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l index 728d6184..d360f6ca 100644 --- a/libs/vkd3d-shader/preproc.l +++ b/libs/vkd3d-shader/preproc.l @@ -746,6 +746,9 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner) if (current_arg) preproc_text_add(current_arg, text); } + + if (current_arg) + preproc_text_add(current_arg, " "); break; } } diff --git a/tests/preproc-macro.shader_test b/tests/preproc-macro.shader_test index 8f073965..96e4b865 100644 --- a/tests/preproc-macro.shader_test +++ b/tests/preproc-macro.shader_test @@ -311,3 +311,9 @@ apple # KEY #define KEY(a) KEY2(a) KEY(pa) + +[preproc] +#define KEY2(x) x +#define KEY KEY2(fa il) +KEY +pass