1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +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:
Andy Savage
2020-12-15 17:00:39 +00:00
committed by Rémi Verschelde
parent f5f04a10f5
commit d097c0213c
2 changed files with 5 additions and 5 deletions

View File

@@ -345,7 +345,7 @@ Error FileAccessCompressed::get_error() const {
void FileAccessCompressed::flush() {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
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.");
// compressed files keep data in memory till close()
}
@@ -353,7 +353,7 @@ void FileAccessCompressed::flush() {
void FileAccessCompressed::store_8(uint8_t p_dest) {
ERR_FAIL_COND_MSG(!f, "File must be opened before use.");
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.");
WRITE_FIT(1);
write_ptr[write_pos++] = p_dest;