diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-09-07 15:58:22 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 18:20:21 +0900 |
| commit | 55a2ff5faf036a9dbffcb24eacfbfde79cf93d10 (patch) | |
| tree | eaf234a0bdfc145815e9994d364d3093e089d839 /mrbgems/mruby-sprintf | |
| parent | ed97c1779e953653125d7e17597c1893e6b2374c (diff) | |
| download | mruby-55a2ff5faf036a9dbffcb24eacfbfde79cf93d10.tar.gz mruby-55a2ff5faf036a9dbffcb24eacfbfde79cf93d10.zip | |
Use `MRB_INT_MAX` instead of `INT_MAX` according to variable type.
Diffstat (limited to 'mrbgems/mruby-sprintf')
| -rw-r--r-- | mrbgems/mruby-sprintf/src/sprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
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'; |
