Skip to content

Commit

Permalink
SporeModManager: fix crash when passing empty arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Nov 9, 2023
1 parent 9c1c1a6 commit 4ab0063
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SporeModManager/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ int main(int argc, char** argv)
{
arg_str_type arg = args.at(i);

// skip empty or invalid arguments
if (arg.empty() || arg.size() < 2)
{
continue;
}

if (arg.at(0) == arg_char('-'))
{
if (arg.at(1) != arg_char('-'))
Expand Down

0 comments on commit 4ab0063

Please sign in to comment.