mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler (codegen): loop info may be NULL (retry)
This commit is contained in:
@@ -3199,14 +3199,14 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
|
||||
case NODE_RETRY:
|
||||
{
|
||||
const char *msg = "unexpected retry";
|
||||
const struct loopinfo *lp = s->loop;
|
||||
|
||||
while (lp && lp->type != LOOP_RESCUE) {
|
||||
lp = lp->prev;
|
||||
}
|
||||
if (!lp) {
|
||||
raise_error(s, msg);
|
||||
raise_error(s, "unexpected retry");
|
||||
break;
|
||||
}
|
||||
else {
|
||||
genjmp(s, OP_JMPUW, lp->pc0);
|
||||
|
||||
Reference in New Issue
Block a user