summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-06-11 20:42:53 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-06-11 20:42:53 +0200
commit4ddd5edf31908db841ae4974433189408e321d64 (patch)
treeea8ef456c6241d791644de1fd7b5cfb828a38953 /updater
parentMerge "Remove etc/META-INF/com/google/android/update-script." (diff)
parentupdater: Fix the broken ReadFileFn. (diff)
downloadandroid_bootable_recovery-4ddd5edf31908db841ae4974433189408e321d64.tar
android_bootable_recovery-4ddd5edf31908db841ae4974433189408e321d64.tar.gz
android_bootable_recovery-4ddd5edf31908db841ae4974433189408e321d64.tar.bz2
android_bootable_recovery-4ddd5edf31908db841ae4974433189408e321d64.tar.lz
android_bootable_recovery-4ddd5edf31908db841ae4974433189408e321d64.tar.xz
android_bootable_recovery-4ddd5edf31908db841ae4974433189408e321d64.tar.zst
android_bootable_recovery-4ddd5edf31908db841ae4974433189408e321d64.zip
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 bab2fe166..cfd6a97ee 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -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());