*Correctly* removing extra mrb_str_to_str call

This commit is contained in:
Jared Breeden
2015-06-22 20:49:09 -07:00
parent cfcca2a727
commit 9ad632559e
+2 -2
View File
@@ -2003,12 +2003,12 @@ 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) {
/* Raises if the string contains a null character (the badcheck) */
s = mrb_string_value_cstr(mrb, &str);
}
else {
s = RSTRING_PTR(str);
s = mrb_string_value_ptr(mrb, str);
}
if (s) {
len = RSTRING_LEN(str);