diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-03 12:57:56 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-08-03 13:00:11 +0900 |
| commit | b9d2b47f163e4934d180455126f1015525916fff (patch) | |
| tree | 0b55c896d82a8f3b4f28960ede022e6a795e79d7 /src/error.c | |
| parent | 23e7cb41e5b4b023edfa2a018545b8f09069533c (diff) | |
| download | mruby-b9d2b47f163e4934d180455126f1015525916fff.tar.gz mruby-b9d2b47f163e4934d180455126f1015525916fff.zip | |
Replace `mrb_fixnum_value()` with `mrb_int_value()`.
Use `mrb_fixnum_value()` only when you are absolutely sure that the
value is within `Fixnum` range, i.e. 31 bits signed integer at least.
Diffstat (limited to 'src/error.c')
| -rw-r--r-- | src/error.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/error.c b/src/error.c index 45e118b96..0ef7bc9c1 100644 --- a/src/error.c +++ b/src/error.c @@ -286,7 +286,7 @@ mrb_vformat(mrb_state *mrb, const char *format, va_list ap) #else i = *p == 'd' ? (mrb_int)va_arg(ap, int) : va_arg(ap, mrb_int); #endif - obj = mrb_fixnum_value(i); + obj = mrb_int_value(mrb, i); goto L_cat_obj; #ifndef MRB_NO_FLOAT case 'f': |
