summaryrefslogtreecommitdiffhomepage
path: root/src/dump.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-09-19 23:49:17 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 18:20:24 +0900
commit618c589162b32b790bfd6ae79f7c1a3211a511f9 (patch)
tree63131ba36738685c44644ef9d943980e7f38cb30 /src/dump.c
parentab2b42d363742776ceb948570b3a9a5ea9670d07 (diff)
downloadmruby-618c589162b32b790bfd6ae79f7c1a3211a511f9.tar.gz
mruby-618c589162b32b790bfd6ae79f7c1a3211a511f9.zip
Should use `PRId32` to dump `.i32`; ref #5084
The fix was proposed by @dearblue
Diffstat (limited to 'src/dump.c')
-rw-r--r--src/dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dump.c b/src/dump.c
index cf1ca87ce..3c7c5ac84 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -980,7 +980,7 @@ dump_pool(mrb_state *mrb, const mrb_pool_value *p, FILE *fp)
fprintf(fp, "{IREP_TT_INT64, {.i64=%" PRId64 "}},\n", p->u.i64);
}
else {
- fprintf(fp, "{IREP_TT_INT32, {.i64=%" PRId64 "}},\n", p->u.i64);
+ fprintf(fp, "{IREP_TT_INT32, {.i32=%" PRId32 "}},\n", (int32_t)p->u.i64);
}
break;
#endif