summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index 4f50a5dc8c..b51e99a760 100644
--- a/io.c
+++ b/io.c
@@ -7669,7 +7669,7 @@ nogvl_copy_stream_read_write(struct copy_stream_struct *stp)
while (use_eof || 0 < copy_length) {
if (!use_eof && copy_length < sizeof(buf)) {
- len = copy_length;
+ len = (size_t)copy_length;
}
else {
len = sizeof(buf);
@@ -7862,7 +7862,7 @@ copy_stream_body(VALUE arg)
long len = src_fptr->rbuf_len;
VALUE str;
if (stp->copy_length != (off_t)-1 && stp->copy_length < len) {
- len = stp->copy_length;
+ len = (size_t)stp->copy_length;
}
str = rb_str_buf_new(len);
rb_str_resize(str,len);