summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-05-25 20:39:08 +1000
committerDamien George <damien.p.george@gmail.com>2017-05-25 20:39:08 +1000
commit04d05db27ec4a160dcb3d3ff2934184fef455dbf (patch)
treeefe7b96b8f3d135b73f352a5c989ea280c31ccd4 /py
parent68e71eacb8f5e67f9765ccd8639ca359bc3417de (diff)
downloadmicropython-04d05db27ec4a160dcb3d3ff2934184fef455dbf.tar.gz
micropython-04d05db27ec4a160dcb3d3ff2934184fef455dbf.zip
py/vm: Fix bug with unwind jump popping the iterator from a for loop.
This patch fixes a regression introduced by 088740ecc40476fd0796a3ef6a68ee7c677eae64
Diffstat (limited to 'py')
-rw-r--r--py/vm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/py/vm.c b/py/vm.c
index 9704bc15ac..5094e3e450 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -690,8 +690,7 @@ unwind_jump:;
}
ip = (const byte*)MP_OBJ_TO_PTR(POP()); // pop destination ip for jump
if (unum != 0) {
- // pop iter and iter_buf
- sp--;
+ // pop the exhausted iterator
sp -= MP_OBJ_ITER_BUF_NSLOTS;
}
DISPATCH_WITH_PEND_EXC_CHECK();