summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-19 07:57:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-19 07:57:20 +0000
commit0bf772650793320e2640e24966ab2a0cca6ecdba (patch)
tree28e768dd6e43d688446d0d90b94676bf536237cd /io.c
parent3816f7574f1142e6bd9eb4117782d6df85959960 (diff)
io.c: initialize variable
* io.c (rb_io_each_codepoint): fix use of uninitialized variable. [Bug #11444] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index 93a808b..9fa8eaf 100644
--- a/io.c
+++ b/io.c
@@ -3709,6 +3709,7 @@ rb_io_each_codepoint(VALUE io)
READ_CHECK(fptr);
if (NEED_READCONV(fptr)) {
SET_BINARY_MODE(fptr);
+ r = 1; /* no invalid char yet */
for (;;) {
make_readconv(fptr, 0);
for (;;) {