mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/preproc: Don't add additional spaces after whitespace tokens.
This is especially a problem when e.g. it introduces a whitespace before a #pragma directive, breaking shader compilation. Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a75560af3d
commit
d2104522fe
@ -578,6 +578,9 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
|
|||||||
if (ctx->current_directive)
|
if (ctx->current_directive)
|
||||||
return return_token(token, lval, text);
|
return return_token(token, lval, text);
|
||||||
|
|
||||||
|
if (isspace(text[0]))
|
||||||
|
vkd3d_string_buffer_printf(&ctx->buffer, "%s", text);
|
||||||
|
else
|
||||||
vkd3d_string_buffer_printf(&ctx->buffer, "%s ", text);
|
vkd3d_string_buffer_printf(&ctx->buffer, "%s ", text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user