summaryrefslogtreecommitdiffhomepage
path: root/src/codedump.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-11-16 22:49:03 +0900
committerGitHub <[email protected]>2020-11-16 22:49:03 +0900
commit2609f0a2b3c4bdcb9160cce778501d7402e5dfbf (patch)
treeef3fb4ee9dd0aba90baeecd14e03b514d4341e2c /src/codedump.c
parent5156ea997f784ea0e31fdf4df501298b0c46001d (diff)
parent7c470e25b8f1e2308e47a3b49b5910e8115ab500 (diff)
downloadmruby-2609f0a2b3c4bdcb9160cce778501d7402e5dfbf.tar.gz
mruby-2609f0a2b3c4bdcb9160cce778501d7402e5dfbf.zip
Merge pull request #5139 from shuujii/avoid-undefined-behavior
Avoid undefined behavior
Diffstat (limited to 'src/codedump.c')
-rw-r--r--src/codedump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codedump.c b/src/codedump.c
index 5acc274c3..e70df3205 100644
--- a/src/codedump.c
+++ b/src/codedump.c
@@ -170,7 +170,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)(b<<16)+c);
+ printf("OP_LOADI32\tR%d\t%d\t", a, (int)(((uint32_t)b<<16)+c));
print_lv_a(mrb, irep, a);
break;
CASE(OP_LOADI__1, B);