mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add assertion as originally intended; ref #4986
This commit is contained in:
@@ -1493,6 +1493,7 @@ mrb_io_readchar(mrb_state *mrb, mrb_value self)
|
||||
#endif
|
||||
|
||||
mrb_get_args(mrb, "S", &buf);
|
||||
mrb_assert(RSTRING_LEN(buf) > 0);
|
||||
mrb_assert(RSTRING_PTR(buf) != NULL);
|
||||
mrb_str_modify(mrb, RSTRING(buf));
|
||||
#ifdef MRB_UTF8_STRING
|
||||
|
||||
Reference in New Issue
Block a user