1
0
Fork 0

Fix 908ee729: Inverted condition prevented actually writing data to files. (#12941)

pull/12942/head
Peter Nelson 2024-09-16 14:45:23 +01:00 committed by GitHub
parent ad020759c7
commit 74910d3d14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -2261,7 +2261,7 @@ struct FileWriter : SaveFilter {
void Write(uint8_t *buf, size_t size) override
{
/* We're in the process of shutting down, i.e. in "failure" mode. */
if (this->file.has_value()) return;
if (!this->file.has_value()) return;
if (fwrite(buf, 1, size, *this->file) != size) SlError(STR_GAME_SAVELOAD_ERROR_FILE_NOT_WRITEABLE);
}