vkd3d-shader: Use yy_scan_bytes() instead of yy_scan_string().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura
2021-03-04 17:33:28 -06:00
committed by Alexandre Julliard
parent b35fd8628e
commit 001328e084
5 changed files with 7 additions and 7 deletions

View File

@@ -282,13 +282,13 @@ static void update_location(struct hlsl_ctx *ctx, YYLTYPE *lloc)
ctx->location.column += yyget_leng(ctx->scanner);
}
int hlsl_lexer_compile(struct hlsl_ctx *ctx, const char *text)
int hlsl_lexer_compile(struct hlsl_ctx *ctx, const struct vkd3d_shader_code *hlsl)
{
YY_BUFFER_STATE buffer;
int ret;
yylex_init_extra(ctx, &ctx->scanner);
buffer = yy_scan_string(text, ctx->scanner);
buffer = yy_scan_bytes(hlsl->code, hlsl->size, ctx->scanner);
yy_switch_to_buffer(buffer, ctx->scanner);
ret = hlsl_yyparse(ctx->scanner, ctx);