diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-04 00:08:17 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-04 00:08:17 +0900 |
| commit | a6657afab9ffb258b01b3d6e485a86328bf4d40e (patch) | |
| tree | ea6f250fa8bd3eaff694751985631867f674e354 /mrbgems/mruby-compiler/core/codegen.c | |
| parent | 39aed39139782d26299876c3aa527c6d094294b1 (diff) | |
| download | mruby-a6657afab9ffb258b01b3d6e485a86328bf4d40e.tar.gz mruby-a6657afab9ffb258b01b3d6e485a86328bf4d40e.zip | |
codegen.c: jump address should be generated by `gen_jmpdst()`.
Diffstat (limited to 'mrbgems/mruby-compiler/core/codegen.c')
| -rw-r--r-- | mrbgems/mruby-compiler/core/codegen.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index 5ab2f6180..16488cf33 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -444,15 +444,13 @@ genjmp2(codegen_scope *s, mrb_code i, uint16_t a, uint32_t pc, int val) gen_B(s, OP_EXT1); gen_B(s, i); gen_S(s, a); - pos = s->pc; - gen_S(s, pc); } else { gen_B(s, i); gen_B(s, (uint8_t)a); - pos = s->pc; - gen_jmpdst(s, pc); } + pos = s->pc; + gen_jmpdst(s, pc); return pos; } |
