- fixed two apparently bogus asserts with returning gloating point constants.

This commit is contained in:
Christoph Oelckers 2016-11-30 19:22:56 +01:00
parent 3f98ba9069
commit 1895feb185
2 changed files with 3 additions and 3 deletions

View File

@ -1827,12 +1827,12 @@ static void SetReturn(const VMRegisters &reg, 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 = &reg.f[regnum];
}
if (regtype & REGT_MULTIREG3)

View File

@ -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
{