diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-13 12:38:10 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-13 12:38:10 +0900 |
| commit | 9e74aad43c8a7652c3cc0ffdc282c66ea866999b (patch) | |
| tree | 9bc447534e9fd29b63096de90357887e5f3c1008 | |
| parent | 7907c184be2734e477511f9633e9b683cd8fe5b3 (diff) | |
| download | mruby-9e74aad43c8a7652c3cc0ffdc282c66ea866999b.tar.gz mruby-9e74aad43c8a7652c3cc0ffdc282c66ea866999b.zip | |
codegen.c: fixed a bug in `mrb_decode_insn()`.
| -rw-r--r-- | mrbgems/mruby-compiler/core/codegen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index 8ece1a0fb..3f849b0f1 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -324,12 +324,12 @@ mrb_decode_insn(const mrb_code *pc) { struct mrb_insn_data data = { 0 }; if (pc == 0) return data; + data.addr = pc; 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; |
