Skip to content

Commit

Permalink
Fix exit status
Browse files Browse the repository at this point in the history
  • Loading branch information
momo5502 committed Jan 25, 2025
1 parent ddbe94e commit 617a68e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/analyzer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,14 @@ namespace
}

const auto exit_status = win_emu.process().exit_status;
if (exit_status.has_value())
{
win_emu.log.print(color::red, "Emulation terminated with status: %X\n", *exit_status);
return false;
}
else
if (!exit_status.has_value())
{
win_emu.log.print(color::green, "Emulation terminated without status!\n");
return true;
return false;
}

win_emu.log.print(color::red, "Emulation terminated with status: %X\n", *exit_status);
return *exit_status == STATUS_SUCCESS;
}

std::vector<std::u16string> parse_arguments(const std::span<const std::string_view> args)
Expand Down

0 comments on commit 617a68e

Please sign in to comment.