aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/readwritefile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/readwritefile.cpp b/src/util/readwritefile.cpp
index 15e9d7a9b9..a45c41d367 100644
--- a/src/util/readwritefile.cpp
+++ b/src/util/readwritefile.cpp
@@ -40,6 +40,8 @@ bool WriteBinaryFile(const fs::path &filename, const std::string &data)
fclose(f);
return false;
}
- fclose(f);
+ if (fclose(f) != 0) {
+ return false;
+ }
return true;
}