You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-26 15:46:23 +00:00
Quick fix to incorrect error messages when writing to compressed or encrypted files.
(cherry picked from commit c65f097ebd)
This commit is contained in:
committed by
Rémi Verschelde
parent
f5f04a10f5
commit
d097c0213c
@@ -255,7 +255,7 @@ Error FileAccessEncrypted::get_error() const {
|
||||
|
||||
void FileAccessEncrypted::store_buffer(const uint8_t *p_src, int p_length) {
|
||||
|
||||
ERR_FAIL_COND_MSG(!writing, "File has not been opened in read mode.");
|
||||
ERR_FAIL_COND_MSG(!writing, "File has not been opened in write mode.");
|
||||
|
||||
if (pos < data.size()) {
|
||||
|
||||
@@ -275,14 +275,14 @@ void FileAccessEncrypted::store_buffer(const uint8_t *p_src, int p_length) {
|
||||
}
|
||||
|
||||
void FileAccessEncrypted::flush() {
|
||||
ERR_FAIL_COND_MSG(!writing, "File has not been opened in read mode.");
|
||||
ERR_FAIL_COND_MSG(!writing, "File has not been opened in write mode.");
|
||||
|
||||
// encrypted files keep data in memory till close()
|
||||
}
|
||||
|
||||
void FileAccessEncrypted::store_8(uint8_t p_dest) {
|
||||
|
||||
ERR_FAIL_COND_MSG(!writing, "File has not been opened in read mode.");
|
||||
ERR_FAIL_COND_MSG(!writing, "File has not been opened in write mode.");
|
||||
|
||||
if (pos < data.size()) {
|
||||
data.write[pos] = p_dest;
|
||||
|
||||
Reference in New Issue
Block a user