diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-06-06 15:11:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-06 15:11:04 +0200 |
commit | 972374f4e91dfbfa4a42202abc6e070dad6cdf02 (patch) | |
tree | 263a98e91c24921c239c0e6aa15f212f4b110d80 | |
parent | 78d3f4742872f535ebc75500afde4858985c40d8 (diff) | |
parent | 84ad95fdc9d437fee711b5b8ac0acb6c1c950685 (diff) | |
download | rneovim-972374f4e91dfbfa4a42202abc6e070dad6cdf02.tar.gz rneovim-972374f4e91dfbfa4a42202abc6e070dad6cdf02.tar.bz2 rneovim-972374f4e91dfbfa4a42202abc6e070dad6cdf02.zip |
Merge pull request #29221 from bfredl/filebuffix
fix(fileio): copy to correct buffer position when reading
-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; } |