summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-sprintf
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-09-26 09:48:01 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2019-09-26 09:48:01 +0900
commit60cc46a92cf93f408dac22658c6a206e882e0e04 (patch)
tree65fa019eff631642bf4d5e842d92d17a27413ba0 /mrbgems/mruby-sprintf
parent184aeb0694b235642a073c211ec1f7ddb21e6e41 (diff)
downloadmruby-60cc46a92cf93f408dac22658c6a206e882e0e04.tar.gz
mruby-60cc46a92cf93f408dac22658c6a206e882e0e04.zip
Use proper type specifier for `mrb_raisef()`; ref #4731
The following two may be different: * `%d` for `int` * `%i` for `mrb_int`
Diffstat (limited to 'mrbgems/mruby-sprintf')
-rw-r--r--mrbgems/mruby-sprintf/src/sprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c
index 18027b32d..efbfb13e2 100644
--- a/mrbgems/mruby-sprintf/src/sprintf.c
+++ b/mrbgems/mruby-sprintf/src/sprintf.c
@@ -158,14 +158,14 @@ static void
check_pos_arg(mrb_state *mrb, int posarg, mrb_int n)
{
if (posarg > 0) {
- mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%d) after unnumbered(%d)",
+ mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%i) after unnumbered(%d)",
n, posarg);
}
if (posarg == -2) {
- mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%d) after named", n);
+ mrb_raisef(mrb, E_ARGUMENT_ERROR, "numbered(%i) after named", n);
}
if (n < 1) {
- mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid index - %d$", n);
+ mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid index - %i$", n);
}
}