Fix a bug with big negative integers.

parent 5d85045f
...@@ -2561,7 +2561,7 @@ codegen(codegen_scope *s, node *tree, int val) ...@@ -2561,7 +2561,7 @@ codegen(codegen_scope *s, node *tree, int val)
genop_2S(s, OP_LOADI16, cursp(), (uint16_t)i); genop_2S(s, OP_LOADI16, cursp(), (uint16_t)i);
} }
else if (i >= -0x80000000) { else if (i >= -0x80000000) {
genop_2S(s, OP_LOADI32, cursp(), (uint32_t)i); genop_2SS(s, OP_LOADI32, cursp(), (uint32_t)i);
} }
else { else {
int off = new_lit(s, mrb_int_value(s->mrb, i)); int off = new_lit(s, mrb_int_value(s->mrb, i));
......
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