summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-11-04 14:15:51 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-11-04 14:15:51 +0900
commitb77a0f69a3c177aeaaf009395aade36675dc7514 (patch)
treecabb03f96f7dd3d88b1842eaf209f7e79c44d0d3
parent5d85045fcbc9fd9cebc78a4e37c5a69e0293155a (diff)
downloadmruby-b77a0f69a3c177aeaaf009395aade36675dc7514.tar.gz
mruby-b77a0f69a3c177aeaaf009395aade36675dc7514.zip
Fix a bug with big negative integers.
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c2
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));