mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 05:21:02 +00:00
- fixed: FxVMFunctionCall::GetDirectFunction did not check if the function could be called with no arguments.
This commit is contained in:
parent
f11f020b6c
commit
9fab8380ff
1 changed files with 2 additions and 0 deletions
|
@ -7066,6 +7066,8 @@ VMFunction *FxVMFunctionCall::GetDirectFunction()
|
||||||
// it inside VM code.
|
// it inside VM code.
|
||||||
if (ArgList.Size() == 0 && !(Function->Variants[0].Flags & VARF_Virtual))
|
if (ArgList.Size() == 0 && !(Function->Variants[0].Flags & VARF_Virtual))
|
||||||
{
|
{
|
||||||
|
unsigned imp = Function->GetImplicitArgs();
|
||||||
|
if (Function->Variants[0].ArgFlags.Size() <= imp || !(Function->Variants[0].ArgFlags[imp] & VARF_Optional)) return nullptr;
|
||||||
return Function->Variants[0].Implementation;
|
return Function->Variants[0].Implementation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue