Fixed: FxVMFunctionCall didn't check for varargs while checking argument count

This commit is contained in:
Leonard2 2016-10-29 01:30:05 +02:00
parent e5878f0cb2
commit 594a0c2008
1 changed files with 1 additions and 1 deletions

View File

@ -5785,7 +5785,7 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx)
{
bool foundvarargs = false;
PType * type = nullptr;
if (ArgList->Size() + implicit > proto->ArgumentTypes.Size())
if (argtypes.Last() != nullptr && ArgList->Size() + implicit > argtypes.Size())
{
ScriptPosition.Message(MSG_ERROR, "Too many arguments in call to %s", Function->SymbolName.GetChars());
delete this;