diff options
Diffstat (limited to 'src/nvim/event/wstream.c')
| -rw-r--r-- | src/nvim/event/wstream.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/event/wstream.c b/src/nvim/event/wstream.c index fc7aad8eb9..d2fb52243c 100644 --- a/src/nvim/event/wstream.c +++ b/src/nvim/event/wstream.c @@ -1,3 +1,6 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check +// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + #include <assert.h> #include <stdint.h> #include <stdbool.h> @@ -5,6 +8,7 @@ #include <uv.h> +#include "nvim/log.h" #include "nvim/event/loop.h" #include "nvim/event/wstream.h" #include "nvim/vim.h" @@ -86,7 +90,7 @@ bool wstream_write(Stream *stream, WBuffer *buffer) uv_buf_t uvbuf; uvbuf.base = buffer->data; - uvbuf.len = buffer->size; + uvbuf.len = UV_BUF_LEN(buffer->size); if (uv_write(&data->uv_req, stream->uvstream, &uvbuf, 1, write_cb)) { xfree(data); |