Skip to content

Commit 04d05db

Browse files
committed
py/vm: Fix bug with unwind jump popping the iterator from a for loop.
This patch fixes a regression introduced by 088740e
1 parent 68e71ea commit 04d05db

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

py/vm.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,7 @@ unwind_jump:;
690690
}
691691
ip = (const byte*)MP_OBJ_TO_PTR(POP()); // pop destination ip for jump
692692
if (unum != 0) {
693-
// pop iter and iter_buf
694-
sp--;
693+
// pop the exhausted iterator
695694
sp -= MP_OBJ_ITER_BUF_NSLOTS;
696695
}
697696
DISPATCH_WITH_PEND_EXC_CHECK();

0 commit comments

Comments
 (0)