Skip to content

Commit

Permalink
Fix moving position indicator out of bounds in FileAccessMemory
Browse files Browse the repository at this point in the history
  • Loading branch information
Listwon committed Apr 4, 2023
1 parent ef02571 commit bff0c71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/io/file_access_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ uint64_t FileAccessMemory::get_buffer(uint8_t *p_dst, uint64_t p_length) const {
}

memcpy(p_dst, &data[pos], read);
pos += p_length;
pos += read;

return read;
}
Expand Down Expand Up @@ -172,5 +172,5 @@ void FileAccessMemory::store_buffer(const uint8_t *p_src, uint64_t p_length) {
}

memcpy(&data[pos], p_src, write);
pos += p_length;
pos += write;
}

0 comments on commit bff0c71

Please sign in to comment.