mrb_str_to_inum(): no need to call mrb_string_value_cstr() here; ref 05411ee1

parent 05411ee1
......@@ -2198,13 +2198,7 @@ mrb_str_to_inum(mrb_state *mrb, mrb_value str, mrb_int base, mrb_bool badcheck)
const char *s;
mrb_int len;
if (badcheck) {
/* Raises if the string contains a null character (the badcheck) */
s = mrb_string_value_cstr(mrb, &str);
}
else {
s = mrb_string_value_ptr(mrb, str);
}
s = mrb_string_value_ptr(mrb, str);
if (s) {
len = RSTRING_LEN(str);
if (s[len]) { /* no sentinel somehow */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment