summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index d7e1b0fba..e80483145 100644
--- a/src/io.c
+++ b/src/io.c
@@ -420,7 +420,7 @@ mrb_io_sysread(mrb_state *mrb, mrb_value io)
}
if (mrb_nil_p(buf)) {
- buf = mrb_str_new(mrb, "", maxlen);
+ buf = mrb_str_new(mrb, NULL, maxlen);
}
if (RSTRING_LEN(buf) != maxlen) {
buf = mrb_str_resize(mrb, buf, maxlen);