vkd3d-shader/hlsl: Avoid hardcoding the size of the operands array.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura
2021-09-27 20:51:44 -05:00
committed by Alexandre Julliard
parent 897ba6a3c7
commit 98cfd7b09f
3 changed files with 17 additions and 15 deletions

View File

@@ -1108,7 +1108,7 @@ static void dump_ir_expr(struct vkd3d_string_buffer *buffer, const struct hlsl_i
unsigned int i;
vkd3d_string_buffer_printf(buffer, "%s (", debug_hlsl_expr_op(expr->op));
for (i = 0; i < 3 && expr->operands[i].node; ++i)
for (i = 0; i < HLSL_MAX_OPERANDS && expr->operands[i].node; ++i)
{
dump_src(buffer, &expr->operands[i]);
vkd3d_string_buffer_printf(buffer, " ");