summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-string-ext/src/string.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-06-16 11:50:38 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-06-16 11:50:38 +0900
commit0411cea2dfaea223becfdb8da44e29e81325c331 (patch)
tree9c9c75ae6999390fe6de631eaa3093a865d71d02 /mrbgems/mruby-string-ext/src/string.c
parent6fdf2b035d563bf6502eba8953c3199c52c0a89d (diff)
downloadmruby-0411cea2dfaea223becfdb8da44e29e81325c331.tar.gz
mruby-0411cea2dfaea223becfdb8da44e29e81325c331.zip
Use `MRB_PRId` instead of `d` for mrb_int decimal specifier; ref #3701
Diffstat (limited to 'mrbgems/mruby-string-ext/src/string.c')
-rw-r--r--mrbgems/mruby-string-ext/src/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-string-ext/src/string.c b/mrbgems/mruby-string-ext/src/string.c
index c8f14040a..6bab87b06 100644
--- a/mrbgems/mruby-string-ext/src/string.c
+++ b/mrbgems/mruby-string-ext/src/string.c
@@ -611,7 +611,7 @@ mrb_str_upto(mrb_state *mrb, mrb_value beg)
while (bi <= ei) {
if (excl && bi == ei) break;
- snprintf(buf, max_width+1, "%.*d", (int)min_width, bi);
+ snprintf(buf, max_width+1, "%.*" MRB_PRId, (int)min_width, bi);
mrb_yield(mrb, block, mrb_str_new(mrb, buf, strlen(buf)));
mrb_gc_arena_restore(mrb, ai);
bi++;