summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string.c b/src/string.c
index 4125b21c4..f87471e5d 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1102,8 +1102,8 @@ static enum str_convert_range
str_convert_range(mrb_state *mrb, mrb_value str, mrb_value indx, mrb_value alen, mrb_int *beg, mrb_int *len)
{
if (!mrb_undef_p(alen)) {
- *beg = mrb_int(mrb, indx);
- *len = mrb_int(mrb, alen);
+ *beg = mrb_as_int(mrb, indx);
+ *len = mrb_as_int(mrb, alen);
return STR_CHAR_RANGE;
}
else {