1 Feb
2023
1 Feb
'23
8:54 p.m.
Francisco Casas (@fcasas) commented about libs/vkd3d-shader/hlsl.y:
{ struct hlsl_ir_function_decl *decl = RB_ENTRY_VALUE(entry, struct hlsl_ir_function_decl, entry); struct find_function_call_args *args = context; - const struct hlsl_ir_var *param; - unsigned int i = 0; + unsigned int i;
- LIST_FOR_EACH_ENTRY(param, decl->parameters, struct hlsl_ir_var, param_entry) + if (decl->parameters.count > args->params->args_count) + return; This check should be `!=` now if you are deleting the
if (i == args->params->args_count)
check. Otherwise we may end up calling this `decl` even if we provide more arguments than the ones requested. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/77#note_22685