diff --git a/updater/install.cpp b/updater/install.cpp index 1a647dfa..005f9f97 100644 --- a/updater/install.cpp +++ b/updater/install.cpp @@ -1417,7 +1417,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(malloc(fc.data.size())); if (v->data != nullptr) { memcpy(v->data, fc.data.data(), fc.data.size());