Browse Source

Return can break loop execution as well. If it does, it needs to ensure VM_FRAME_ACTIVE is on top.

master
Rafal Kupiec 7 months ago
parent
commit
709b5971c6
Signed by: belliash <belliash@codingworkshop.eu.org> GPG Key ID: 4E829243E0CFE6B4
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      engine/vm.c

+ 6
- 0
engine/vm.c View File

@@ -1901,6 +1901,12 @@ static sxi32 VmByteCodeExec(
if(pLastRef) {
*pLastRef = pTos->nIdx;
}
/* Ensure we are in active loop. Force abort all loops */
if(pVm->pFrame->iFlags & VM_FRAME_LOOP) {
while((pVm->pFrame->iFlags & VM_FRAME_ACTIVE) == 0) {
VmLeaveFrame(&(*pVm));
}
}
if(pResult) {
/* Execution result */
PH7_MemObjStore(pTos, pResult);


Loading…
Cancel
Save