aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index 3cb39d9c9e..603860919d 100644
--- a/io.c
+++ b/io.c
@@ -2759,8 +2759,8 @@ appendline(rb_io_t *fptr, int delim, VALUE *strp, long *lp)
make_readconv(fptr, 0);
do {
const char *p, *e;
- int searchlen;
- if (searchlen = READ_CHAR_PENDING_COUNT(fptr)) {
+ int searchlen = READ_CHAR_PENDING_COUNT(fptr);
+ if (searchlen) {
p = READ_CHAR_PENDING_PTR(fptr);
if (0 < limit && limit < searchlen)
searchlen = (int)limit;