codegen.c: `mrb_prev_pc` can return `NULL` at the top of `iseq`.

parent 01336549
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment