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 0e17d44ba6..d491267733 100644
--- a/io.c
+++ b/io.c
@@ -290,7 +290,7 @@ inline static int set_binary_mode_with_seek_cur(rb_io_t *fptr) {
return setmode(fptr->fd, O_BINARY);
}
/* add extra offset for removed '\r' in rbuf */
- extra_max = pos - fptr->rbuf.len;
+ extra_max = (long)(pos - fptr->rbuf.len);
p = fptr->rbuf.ptr + fptr->rbuf.off;
for (i = 0; i < fptr->rbuf.len; i++) {
if (*p == '\n') newlines++;