Merge \"updater: Fix the broken ReadFileFn.\"
am: 4ddd5edf31
Change-Id: Id73ccb86a3869198baf84b7978054b174c281c79
This commit is contained in:
commit
89dfe730d4
1 changed files with 1 additions and 1 deletions
|
@ -1409,7 +1409,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());
|
||||
|
|
Loading…
Reference in a new issue