Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccb0ba90 authored by Tao Bao's avatar Tao Bao
Browse files

updater: Fix the broken ReadFileFn.

Was accidentally broken by the CL in [1].

[1]: commit d6c93afc

Bug: 29767315
Change-Id: I851e13ccea6f5be6fcd47f712cc95867245f9934
(cherry picked from commit efacd803)
parent 2f272c05
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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<char*>(malloc(fc.data.size()));
        if (v->data != nullptr) {
            memcpy(v->data, fc.data.data(), fc.data.size());