diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-04 14:15:51 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-04 14:15:51 +0900 |
| commit | b77a0f69a3c177aeaaf009395aade36675dc7514 (patch) | |
| tree | cabb03f96f7dd3d88b1842eaf209f7e79c44d0d3 /mrbgems/mruby-compiler/core/codegen.c | |
| parent | 5d85045fcbc9fd9cebc78a4e37c5a69e0293155a (diff) | |
| download | mruby-b77a0f69a3c177aeaaf009395aade36675dc7514.tar.gz mruby-b77a0f69a3c177aeaaf009395aade36675dc7514.zip | |
Fix a bug with big negative integers.
Diffstat (limited to 'mrbgems/mruby-compiler/core/codegen.c')
| -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 5363bb84e..1af071fdb 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -2561,7 +2561,7 @@ codegen(codegen_scope *s, node *tree, int val) genop_2S(s, OP_LOADI16, cursp(), (uint16_t)i); } else if (i >= -0x80000000) { - genop_2S(s, OP_LOADI32, cursp(), (uint32_t)i); + genop_2SS(s, OP_LOADI32, cursp(), (uint32_t)i); } else { int off = new_lit(s, mrb_int_value(s->mrb, i)); |
