aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/event/rstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/event/rstream.c')
-rw-r--r--src/nvim/event/rstream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/event/rstream.c b/src/nvim/event/rstream.c
index e0500ba828..2fbe7f6773 100644
--- a/src/nvim/event/rstream.c
+++ b/src/nvim/event/rstream.c
@@ -95,7 +95,7 @@ static void alloc_cb(uv_handle_t *handle, size_t suggested, uv_buf_t *buf)
// `uv_buf_t.len` happens to have different size on Windows.
size_t write_count;
buf->base = rbuffer_write_ptr(stream->buffer, &write_count);
- buf->len = write_count;
+ buf->len = UV_BUF_LEN(write_count);
}
// Callback invoked by libuv after it copies the data into the buffer provided
@@ -146,7 +146,7 @@ static void fread_idle_cb(uv_idle_t *handle)
// `uv_buf_t.len` happens to have different size on Windows.
size_t write_count;
stream->uvbuf.base = rbuffer_write_ptr(stream->buffer, &write_count);
- stream->uvbuf.len = write_count;
+ stream->uvbuf.len = UV_BUF_LEN(write_count);
// the offset argument to uv_fs_read is int64_t, could someone really try
// to read more than 9 quintillion (9e18) bytes?