diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l index 20cb0c35..7686e018 100644 --- a/libs/vkd3d-shader/preproc.l +++ b/libs/vkd3d-shader/preproc.l @@ -578,7 +578,10 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner) if (ctx->current_directive) return return_token(token, lval, text); - vkd3d_string_buffer_printf(&ctx->buffer, "%s ", text); + if (isspace(text[0])) + vkd3d_string_buffer_printf(&ctx->buffer, "%s", text); + else + vkd3d_string_buffer_printf(&ctx->buffer, "%s ", text); break; }