From ccb0ba908a40df2d97afcaa9c7bf1bd7efa8fcfd Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sat, 11 Jun 2016 03:56:38 -0700 Subject: updater: Fix the broken ReadFileFn. Was accidentally broken by the CL in [1]. [1]: commit d6c93afcc28cc65217ba65eeb646009c4f15a2ad Bug: 29767315 Change-Id: I851e13ccea6f5be6fcd47f712cc95867245f9934 (cherry picked from commit efacd80364c7ed42d56310949790d89febaf3444) --- updater/install.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updater/install.cpp b/updater/install.cpp index 1a647dfa5..005f9f97d 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()); -- cgit v1.2.3