You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-29 16:16:38 +00:00
Fix moving position indicator out of bounds in FileAccessMemory
(cherry picked from commit bff0c71e2e)
This commit is contained in:
committed by
Rémi Verschelde
parent
59f98e3f69
commit
4d8510f9b9
@@ -148,7 +148,7 @@ uint64_t FileAccessMemory::get_buffer(uint8_t *p_dst, uint64_t p_length) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
memcpy(p_dst, &data[pos], read);
|
memcpy(p_dst, &data[pos], read);
|
||||||
pos += p_length;
|
pos += read;
|
||||||
|
|
||||||
return read;
|
return read;
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@ void FileAccessMemory::store_buffer(const uint8_t *p_src, uint64_t p_length) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&data[pos], p_src, write);
|
memcpy(&data[pos], p_src, write);
|
||||||
pos += p_length;
|
pos += write;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileAccessMemory::FileAccessMemory() {
|
FileAccessMemory::FileAccessMemory() {
|
||||||
|
|||||||
Reference in New Issue
Block a user