diff --git a/src/scripting/vm/vmexec.h b/src/scripting/vm/vmexec.h index 225c73cabd..f5e61b5b93 100644 --- a/src/scripting/vm/vmexec.h +++ b/src/scripting/vm/vmexec.h @@ -1827,12 +1827,12 @@ static void SetReturn(const VMRegisters ®, VMFrame *frame, VMReturn *ret, VM_ case REGT_FLOAT: if (regtype & REGT_KONST) { - assert(regnum + ((regtype & REGT_KONST) ? 2u : 0u) < func->NumKonstF); + assert(regnum < func->NumKonstF); src = &func->KonstF[regnum]; } else { - assert(regnum + ((regtype & REGT_KONST) ? 2u : 0u) < frame->NumRegF); + assert(regnum < frame->NumRegF); src = ®.f[regnum]; } if (regtype & REGT_MULTIREG3) diff --git a/src/scripting/vm/vmframe.cpp b/src/scripting/vm/vmframe.cpp index d3ce5d5f97..871a46673c 100644 --- a/src/scripting/vm/vmframe.cpp +++ b/src/scripting/vm/vmframe.cpp @@ -422,7 +422,7 @@ VMFrame *VMFrameStack::PopFrame() int VMFrameStack::Call(VMFunction *func, VMValue *params, int numparams, VMReturn *results, int numresults, VMException **trap) { - assert(this == VMGlobalStack); // why would anyone even want to create a local stack? + assert(this == &GlobalVMStack); // why would anyone even want to create a local stack? bool allocated = false; try {