summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/string.c b/src/string.c
index 9f753a0cf..9a1a6fba1 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2003,6 +2003,7 @@ mrb_str_to_inum(mrb_state *mrb, mrb_value str, mrb_int base, mrb_bool badcheck)
const char *s;
mrb_int len;
+ str = mrb_str_to_str(mrb, str);
if (badcheck) {
s = mrb_string_value_cstr(mrb, &str);
}