summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-04-29 18:34:40 +0900
committerGitHub <[email protected]>2020-04-29 18:34:40 +0900
commitf32c73ad1fc8a35cbd134c30098f3b1a89db0cd8 (patch)
tree337230ceaa1eff42ee120a6322a832c9cebd6221
parenta343439973404f96e155b96a92eb71dadac93f6f (diff)
parent49bba6c997d44f31d8e3bc4ec8f857c06fd0e5b6 (diff)
downloadmruby-f32c73ad1fc8a35cbd134c30098f3b1a89db0cd8.tar.gz
mruby-f32c73ad1fc8a35cbd134c30098f3b1a89db0cd8.zip
Merge pull request #4986 from dearblue/assert-io
Avoid comparing pointers and integers
-rw-r--r--mrbgems/mruby-io/src/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-io/src/io.c b/mrbgems/mruby-io/src/io.c
index 57f4025d6..3d9d2b48a 100644
--- a/mrbgems/mruby-io/src/io.c
+++ b/mrbgems/mruby-io/src/io.c
@@ -1493,7 +1493,7 @@ mrb_io_readchar(mrb_state *mrb, mrb_value self)
#endif
mrb_get_args(mrb, "S", &buf);
- mrb_assert(RSTRING_PTR(buf) > 0);
+ mrb_assert(RSTRING_PTR(buf) != NULL);
mrb_str_modify(mrb, RSTRING(buf));
#ifdef MRB_UTF8_STRING
c = RSTRING_PTR(buf)[0];