Fix lv2_file::op_write regression

This commit is contained in:
Eladash 2020-01-21 14:52:13 +02:00 committed by Ivan
parent ddda09607d
commit f05a3da964
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ u64 lv2_file::op_write(vm::cptr<void> buf, u64 size)
while (result < size)
{
const u64 block = std::min<u64>(size - result, sizeof(local_buf));
std::memcpy(local_buf, static_cast<const uchar*>(buf.get_ptr()), block);
std::memcpy(local_buf, static_cast<const uchar*>(buf.get_ptr()) + result, block);
const u64 nwrite = file.write(+local_buf, block);
result += nwrite;