summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/codedump.c2
-rw-r--r--src/vm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/codedump.c b/src/codedump.c
index 576ff6ceb..b005c1173 100644
--- a/src/codedump.c
+++ b/src/codedump.c
@@ -172,7 +172,7 @@ codedump(mrb_state *mrb, const mrb_irep *irep)
print_lv_a(mrb, irep, a);
break;
CASE(OP_LOADI32, BSS);
- printf("OP_LOADI32\tR%d\t%d\t", a, (int)(((uint32_t)b<<16)+c));
+ printf("OP_LOADI32\tR%d\t%d\t", a, (int32_t)(((uint32_t)b<<16)+c));
print_lv_a(mrb, irep, a);
break;
CASE(OP_LOADI__1, B);
diff --git a/src/vm.c b/src/vm.c
index 76bd541c3..7a93eeac3 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1134,7 +1134,7 @@ RETRY_TRY_BLOCK:
}
CASE(OP_LOADI32, BSS) {
- SET_INT_VALUE(mrb, regs[a], (mrb_int)(((uint32_t)b<<16)+c));
+ SET_INT_VALUE(mrb, regs[a], (int32_t)(((uint32_t)b<<16)+c));
NEXT;
}