summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
Diffstat (limited to 'updater')
-rw-r--r--updater/install.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/updater/install.cpp b/updater/install.cpp
index a6a29b286..11d5215c3 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -1264,7 +1264,7 @@ Value* ReadFileFn(const char* name, State* state, int argc, Expr* argv[]) {
v->data = nullptr;
FileContents fc;
- if (LoadFileContents(filename, &fc) != 0) {
+ if (LoadFileContents(filename, &fc) == 0) {
v->data = static_cast<char*>(malloc(fc.data.size()));
if (v->data != nullptr) {
memcpy(v->data, fc.data.data(), fc.data.size());