py/vm: Fix bug with unwind jump popping the iterator from a for loop.
This patch fixes a regression introduced by 088740ecc40476fd0796a3ef6a68ee7c677eae64
This commit is contained in:
parent
68e71eacb8
commit
04d05db27e
3
py/vm.c
3
py/vm.c
@ -690,8 +690,7 @@ unwind_jump:;
|
|||||||
}
|
}
|
||||||
ip = (const byte*)MP_OBJ_TO_PTR(POP()); // pop destination ip for jump
|
ip = (const byte*)MP_OBJ_TO_PTR(POP()); // pop destination ip for jump
|
||||||
if (unum != 0) {
|
if (unum != 0) {
|
||||||
// pop iter and iter_buf
|
// pop the exhausted iterator
|
||||||
sp--;
|
|
||||||
sp -= MP_OBJ_ITER_BUF_NSLOTS;
|
sp -= MP_OBJ_ITER_BUF_NSLOTS;
|
||||||
}
|
}
|
||||||
DISPATCH_WITH_PEND_EXC_CHECK();
|
DISPATCH_WITH_PEND_EXC_CHECK();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user