- fixed: The JIT compiler crashed on missing ArgFlags.

For ad-hoc Dehacked state functions no ArgFlags are created, in this case they can just be assumed to not be relevant here, because none of these function produces reference arguments.
This commit is contained in:
Christoph Oelckers 2018-12-11 00:21:37 +01:00 committed by drfrag
parent e6590f6ad9
commit 8ad73d32b8

View file

@ -268,7 +268,7 @@ void JitCompiler::SetupSimpleFrame()
for (unsigned int i = 0; i < sfunc->Proto->ArgumentTypes.Size(); i++)
{
const PType *type = sfunc->Proto->ArgumentTypes[i];
if (sfunc->ArgFlags[i] & (VARF_Out | VARF_Ref))
if (sfunc->ArgFlags.Size() && sfunc->ArgFlags[i] & (VARF_Out | VARF_Ref))
{
cc.mov(regA[rega++], x86::ptr(args, argsPos++ * sizeof(VMValue) + offsetof(VMValue, a)));
}