summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/string.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/string.c b/src/string.c
index 2b47b06ca..510bd4e73 100644
--- a/src/string.c
+++ b/src/string.c
@@ -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 */