Skip to content

Commit

Permalink
Merge pull request godotengine#75641 from Listwon/fileaccessmemory-bu…
Browse files Browse the repository at this point in the history
…ffer-pos

Fix moving position indicator out of bounds in FileAccessMemory
  • Loading branch information
akien-mga committed Apr 5, 2023
2 parents b837507 + bff0c71 commit d985d55
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 d985d55

Please sign in to comment.