From b9d2b47f163e4934d180455126f1015525916fff Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 3 Aug 2021 12:57:56 +0900 Subject: 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. --- src/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/error.c') 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': -- cgit v1.2.3