mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
codegen.c: mrb_prev_pc can return NULL at the top of iseq.
This commit is contained in:
@@ -323,12 +323,13 @@ struct mrb_insn_data
|
||||
mrb_decode_insn(const mrb_code *pc)
|
||||
{
|
||||
struct mrb_insn_data data = { 0 };
|
||||
data.addr = pc;
|
||||
if (pc == 0) return data;
|
||||
mrb_code insn = READ_B();
|
||||
uint16_t a = 0;
|
||||
uint16_t b = 0;
|
||||
uint16_t c = 0;
|
||||
|
||||
data.addr = pc;
|
||||
switch (insn) {
|
||||
#define FETCH_Z() /* empty */
|
||||
#define OPCODE(i,x) case OP_ ## i: FETCH_ ## x (); break;
|
||||
|
||||
Reference in New Issue
Block a user