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

Commit 69b9b36c authored by Wei Wang's avatar Wei Wang
Browse files

init: fix BuildTriggersString for empty string

behavior is undefined if pop_back() on empty std::string

Test: grep init log
Bug: 32712851
Bug: 32838381
Change-Id: I5bfac2fb275036abd0158b78df14019d2e82716d
parent 55735986
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -249,7 +249,9 @@ std::string Action::BuildTriggersString() const {
        result += event_trigger_;
        result += ' ';
    }
    if (!result.empty()) {
        result.pop_back();
    }
    return result;
}