mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
codegen.c (mrb_last_insn): no previous instruction on top.
This commit is contained in:
@@ -467,6 +467,10 @@ mrb_prev_pc(codegen_scope *s, const mrb_code *pc)
|
||||
static struct mrb_insn_data
|
||||
mrb_last_insn(codegen_scope *s)
|
||||
{
|
||||
if (s->pc == 0) {
|
||||
struct mrb_insn_data data = { OP_NOP, 0 };
|
||||
return data;
|
||||
}
|
||||
return mrb_decode_insn(&s->iseq[s->lastpc]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user