Merge \\\"updater: Fix the broken ReadFileFn.\\\" am: 4ddd5edf31 am: 89dfe730d4

am: 1e67422f37

Change-Id: I3beade52bfaeea0e84055d007d82ff2ef5c07dbb
This commit is contained in:
Tao Bao
2016-06-11 18:57:05 +00:00
committed by android-build-merger
+1 -1
View File
@@ -1418,7 +1418,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());