wined3d: Use snprintf() in shader_arb_request_a0() (Coverity).

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-08-15 11:09:49 +02:00 committed by Alexandre Julliard
parent f51f911ae5
commit becec522c4
1 changed files with 3 additions and 2 deletions

View File

@ -987,9 +987,10 @@ static void shader_arb_request_a0(const struct wined3d_shader_instruction *ins,
struct shader_arb_ctx_priv *priv = ins->ctx->backend_data;
struct wined3d_string_buffer *buffer = ins->ctx->buffer;
if (!strcmp(priv->addr_reg, src)) return;
if (!strcmp(priv->addr_reg, src))
return;
strcpy(priv->addr_reg, src);
snprintf(priv->addr_reg, sizeof(priv->addr_reg), "%s", src);
shader_addline(buffer, "ARL A0.x, %s;\n", src);
}