From 55a2ff5faf036a9dbffcb24eacfbfde79cf93d10 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 7 Sep 2020 15:58:22 +0900 Subject: Use `MRB_INT_MAX` instead of `INT_MAX` according to variable type. --- mrbgems/mruby-sprintf/src/sprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mrbgems/mruby-sprintf/src/sprintf.c') diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c index 6396096b1..87607a2fe 100644 --- a/mrbgems/mruby-sprintf/src/sprintf.c +++ b/mrbgems/mruby-sprintf/src/sprintf.c @@ -224,7 +224,7 @@ get_num(mrb_state *mrb, const char *p, const char *end, mrb_int *valp) if (mrb_int_mul_overflow(10, next_n, &next_n)) { return NULL; } - if (INT_MAX - (*p - '0') < next_n) { + if (MRB_INT_MAX - (*p - '0') < next_n) { return NULL; } next_n += *p - '0'; -- cgit v1.2.3