- fixed: The minimum parameter count for an action function is 3, so the DEHSUPP parser needs to take this into account when validating the code pointers.

This commit is contained in:
Christoph Oelckers 2016-02-06 00:19:38 +01:00
parent 95f3a9909c
commit ee3c41bf7b

View file

@ -2723,9 +2723,9 @@ static bool LoadDehSupp ()
else
{
TArray<DWORD> &args = sym->Variants[0].ArgFlags;
if (args.Size() != 0 && !(args[0] & VARF_Optional))
if (args.Size() > 3 && !(args[3] & VARF_Optional))
{
sc.ScriptError("Incompatible code pointer '%s'", sc.String);
sc.ScriptMessage("Incompatible code pointer '%s' %d, %d", sc.String, args.Size(), args.Size() > 3? args[3] : 0);
}
}
Actions.Push(sym);