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.
pull/5585/head
Jim Mussared 2020-01-24 18:01:55 +11:00 zatwierdzone przez Damien George
rodzic 0de304e7da
commit 888ddb81dd
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -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;
}
}
}