mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Handle error expressions in subscripts.
This commit is contained in:
parent
c66f25016b
commit
84685fb56d
Notes:
Henri Verbeet
2024-10-07 17:53:50 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1148
@ -8810,7 +8810,6 @@ postfix_expr:
|
|||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
vkd3d_free($3);
|
vkd3d_free($3);
|
||||||
$$ = $1;
|
|
||||||
}
|
}
|
||||||
else if (hlsl_is_numeric_type(node->data_type))
|
else if (hlsl_is_numeric_type(node->data_type))
|
||||||
{
|
{
|
||||||
@ -8824,14 +8823,14 @@ postfix_expr:
|
|||||||
}
|
}
|
||||||
hlsl_block_add_instr($1, swizzle);
|
hlsl_block_add_instr($1, swizzle);
|
||||||
vkd3d_free($3);
|
vkd3d_free($3);
|
||||||
$$ = $1;
|
|
||||||
}
|
}
|
||||||
else
|
else if (node->data_type->class != HLSL_CLASS_ERROR)
|
||||||
{
|
{
|
||||||
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_SYNTAX, "Invalid subscript \"%s\".", $3);
|
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_SYNTAX, "Invalid subscript \"%s\".", $3);
|
||||||
vkd3d_free($3);
|
vkd3d_free($3);
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
|
$$ = $1;
|
||||||
}
|
}
|
||||||
| postfix_expr '[' expr ']'
|
| postfix_expr '[' expr ']'
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user