- 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
parent 28516c2def
commit ad8f484836
1 changed files with 1 additions and 1 deletions

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)));
}