Skip to content

Commit

Permalink
Fixes issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
chebum committed May 20, 2021
1 parent 08b3ae6 commit 8d3045f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,17 @@ public static List<ProgramArgs> ParseArgs(string[] args) {
});
} else {
var spaceIndex = arg.IndexOf(' ');
res.Add(new ProgramArgs {
ExeName = arg.Substring(0, spaceIndex),
Arguments = arg.Substring(spaceIndex + 1)
});
if (spaceIndex < 0) {
res.Add(new ProgramArgs {
ExeName = arg,
Arguments = ""
});
} else {
res.Add(new ProgramArgs {
ExeName = arg.Substring(0, spaceIndex),
Arguments = arg.Substring(spaceIndex + 1).Trim()
});
}
}
}
return res;
Expand Down

0 comments on commit 8d3045f

Please sign in to comment.