diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-21 07:03:06 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-21 07:03:06 +0000 |
commit | 8f05568afb57e733196408a500cfd9c48fb88fac (patch) | |
tree | bd8143e507b0da4a3be857aa436b71835fe55f2e /io.c | |
parent | 10aaddb811afb5501178eb64c0cefbcd95cd0635 (diff) | |
download | ruby-8f05568afb57e733196408a500cfd9c48fb88fac.tar.gz |
* io.c (read_all): fix: false negative invalid byte seequence
on reading from pipes. [ruby-dev:39743]
fix: assigin the variable 'pos' as relative value from recent pos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1742,7 +1742,7 @@ read_all(rb_io_t *fptr, long siz, VALUE str) } bytes += n; if (cr != ENC_CODERANGE_BROKEN) - pos = rb_str_coderange_scan_restartable(RSTRING_PTR(str) + pos, RSTRING_PTR(str) + bytes, enc, &cr); + pos += rb_str_coderange_scan_restartable(RSTRING_PTR(str) + pos, RSTRING_PTR(str) + bytes, enc, &cr); if (bytes < siz) break; siz += BUFSIZ; rb_str_resize(str, siz); |