summaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-06-11 12:56:38 +0200
committerTao Bao <tbao@google.com>2016-06-11 12:59:56 +0200
commitefacd80364c7ed42d56310949790d89febaf3444 (patch)
tree7dd292e615eaa2223644a50e20322deb1b0af486 /updater
parentMerge "recovery: Add support to brick a device." (diff)
downloadandroid_bootable_recovery-efacd80364c7ed42d56310949790d89febaf3444.tar
android_bootable_recovery-efacd80364c7ed42d56310949790d89febaf3444.tar.gz
android_bootable_recovery-efacd80364c7ed42d56310949790d89febaf3444.tar.bz2
android_bootable_recovery-efacd80364c7ed42d56310949790d89febaf3444.tar.lz
android_bootable_recovery-efacd80364c7ed42d56310949790d89febaf3444.tar.xz
android_bootable_recovery-efacd80364c7ed42d56310949790d89febaf3444.tar.zst
android_bootable_recovery-efacd80364c7ed42d56310949790d89febaf3444.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());