mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- fixed initialization of default parameters in dynamically created function calls like in the MENUDEF parser
This commit is contained in:
parent
6f397854d0
commit
80c6505eee
1 changed files with 4 additions and 1 deletions
|
@ -633,7 +633,10 @@ int VMCallWithDefaults(VMFunction *func, TArray<VMValue> ¶ms, VMReturn *resu
|
|||
{
|
||||
auto oldp = params.Size();
|
||||
params.Resize(func->DefaultArgs.Size());
|
||||
memcpy(¶ms[oldp], &func->DefaultArgs[oldp], (params.Size() - oldp) * sizeof(VMValue));
|
||||
for (unsigned i = oldp; i < params.Size(); i++)
|
||||
{
|
||||
params[i] = func->DefaultArgs[i];
|
||||
}
|
||||
}
|
||||
return VMCall(func, params.Data(), params.Size(), results, numresults);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue