Skip to content
Permalink
Browse files

Fix a crash in DSPTool on malformed command line

  • Loading branch information...
CookiePLMonster committed Jun 23, 2019
1 parent 9eab3fe commit 5f0b4d8da5a852774a18f85707c064665974b701
Showing with 20 additions and 2 deletions.
  1. +20 −2 Source/DSPTool/DSPTool.cpp
@@ -400,21 +400,39 @@ int main(int argc, const char* argv[])
{
const std::string argument = argv[i];
if (argument == "-d")
{
disassemble = true;
}
else if (argument == "-o")
output_name = argv[++i];
{
if (++i < argc)
output_name = argv[i];
}
else if (argument == "-h")
output_header_name = argv[++i];
{
if (++i < argc)
output_header_name = argv[i];
}
else if (argument == "-c")
{
compare = true;
}
else if (argument == "-s")
{
outputSize = true;
}
else if (argument == "-m")
{
multiple = true;
}
else if (argument == "-f")
{
force = true;
}
else if (argument == "-p")
{
print_results = true;
}
else if (argument == "-ps")
{
print_results = true;

0 comments on commit 5f0b4d8

Please sign in to comment.
You can’t perform that action at this time.