mirror of
https://github.com/godotengine/godot.git
synced 2024-12-27 11:24:59 +08:00
Merge pull request #75641 from Listwon/fileaccessmemory-buffer-pos
Fix moving position indicator out of bounds in FileAccessMemory
This commit is contained in:
commit
d985d559bc
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user