From f225db4ed6095cc0f4f62cce9d0df3f2ff348a51 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 25 Apr 2022 10:04:39 +0900 Subject: [PATCH] string.c: move compilation condition to remove unreachable code. --- src/string.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/string.c b/src/string.c index 754a3b5ca..f6f97c7df 100644 --- a/src/string.c +++ b/src/string.c @@ -2319,8 +2319,9 @@ mrb_str_len_to_integer(mrb_state *mrb, const char *str, size_t len, mrb_int base } if (badcheck && trailingbad(str, p, pend)) goto bad; return mrb_bint_new_str(mrb, p2, (mrb_int)(p3-p2), sign ? base : -base); -#endif +#else mrb_raisef(mrb, E_RANGE_ERROR, "string (%l) too big for integer", str, pend-str); +#endif } n += c; }