mruby-compiler (codegen): loop info may be NULL (redo)

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-12-17 10:39:34 +09:00
parent f67939ff78
commit a77b9b4bab
+1
View File
@@ -3187,6 +3187,7 @@ codegen(codegen_scope *s, node *tree, int val)
for (const struct loopinfo *lp = s->loop; ; lp = lp->prev) {
if (!lp) {
raise_error(s, "unexpected redo");
break;
}
if (lp->type != LOOP_BEGIN && lp->type != LOOP_RESCUE) {
genjmp(s, OP_JMPUW, lp->pc1);