diff options
| author | TOMITA Masahiro <[email protected]> | 2014-12-15 20:24:01 +0900 |
|---|---|---|
| committer | TOMITA Masahiro <[email protected]> | 2014-12-15 20:24:01 +0900 |
| commit | be9e203563b761f271abc58e1854f027ad808641 (patch) | |
| tree | 0875efd08a7530af2ee5bd92e5f3b05578351e97 /src/io.c | |
| parent | d1fee5892adb23565fddd9f8e762cc4ca8fd8cb3 (diff) | |
| download | mruby-be9e203563b761f271abc58e1854f027ad808641.tar.gz mruby-be9e203563b761f271abc58e1854f027ad808641.zip | |
FIX: IO#sysread occurs SEGV
Diffstat (limited to 'src/io.c')
| -rw-r--r-- | src/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |
