mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fix a bug with big negative integers.
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user