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

Commit 92157cdd authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixed nullptr check.

arg[0] is always the command being passed to execvp and hence it will
never be null; the real args start at arg[1]

BUG: 27832567
Change-Id: I3180eae857cf028315b1da7cbd38b40994ff98b0
Fixes: 29276781
parent 194198f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1376,7 +1376,7 @@ void format_args(int argc, const char *argv[], std::string *args) {
void format_args(const char* command, const char *args[], std::string *string) {
    LOG_ALWAYS_FATAL_IF(args == nullptr || command == nullptr);
    string->append(command);
    if (args[0] == nullptr) return;
    if (args[1] == nullptr) return;
    string->append(" ");

    for (int arg = 1; arg <= 1000; ++arg) {