summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 7b0afa44cd..7acd28571b 100644
--- a/io.c
+++ b/io.c
@@ -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);