mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -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,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user