summaryrefslogtreecommitdiff
path: root/py/emitnative.c
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2020-01-24 18:01:55 +1100
committerDamien George <damien.p.george@gmail.com>2020-01-27 13:22:03 +1100
commit888ddb81ddfe9cd43991f8054967a0f0d5911cf1 (patch)
tree48ba3158bfef035adf8535617737dcedfb204e57 /py/emitnative.c
parent0de304e7dabbee443dd96935a8045a227eba455b (diff)
py/emitnative: Stop after finding an unwind target.
The loop searches backwards for a target, but doesn't stop after finding the first result, meaning that it'll always end up at the outermost exception handler.
Diffstat (limited to 'py/emitnative.c')
-rw-r--r--py/emitnative.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/emitnative.c b/py/emitnative.c
index 0affbeb0b..d0252560f 100644
--- a/py/emitnative.c
+++ b/py/emitnative.c
@@ -2774,6 +2774,7 @@ STATIC void emit_native_yield(emit_t *emit, int kind) {
// Found active handler, get its PC
ASM_MOV_REG_PCREL(emit->as, REG_RET, e->label);
ASM_MOV_LOCAL_REG(emit->as, LOCAL_IDX_EXC_HANDLER_PC(emit), REG_RET);
+ break;
}
}
}