diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-06-06 13:48:05 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-06-06 13:48:05 +0200 |
commit | 84ad95fdc9d437fee711b5b8ac0acb6c1c950685 (patch) | |
tree | 263a98e91c24921c239c0e6aa15f212f4b110d80 | |
parent | 78d3f4742872f535ebc75500afde4858985c40d8 (diff) | |
download | rneovim-84ad95fdc9d437fee711b5b8ac0acb6c1c950685.tar.gz rneovim-84ad95fdc9d437fee711b5b8ac0acb6c1c950685.tar.bz2 rneovim-84ad95fdc9d437fee711b5b8ac0acb6c1c950685.zip |
fix(fileio): copy to correct buffer position when reading
fixes #29186 (likely)
fixup for #29093 064483a2b
-rw-r--r-- | src/nvim/os/fileio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/os/fileio.c b/src/nvim/os/fileio.c index c87b2d359f..5f372b2376 100644 --- a/src/nvim/os/fileio.c +++ b/src/nvim/os/fileio.c @@ -300,7 +300,7 @@ ptrdiff_t file_read(FileDescriptor *const fp, char *const ret_buf, const size_t } else { fp->write_pos += r_ret; size_t to_copy = MIN((size_t)r_ret, read_remaining); - memcpy(ret_buf, fp->read_pos, to_copy); + memcpy(buf, fp->read_pos, to_copy); fp->read_pos += to_copy; read_remaining -= to_copy; } |