Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions src/BinlogTool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,11 @@ binlogtool search *.binlog search string
return 0;
}

if (string.Equals(firstArg, "compilerinvocations", StringComparison.OrdinalIgnoreCase))
if (args.Length >= 2 && string.Equals(firstArg, "compilerinvocations", StringComparison.OrdinalIgnoreCase))
{
string binlog = null;
string binlog = binlog = args[1];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= binlog = binlog is duplicated

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix it myself

string outputFile = null;
if (args.Length >= 2)
{
binlog = args[1];
}
else if (args.Length == 3)
if (args.Length == 3)
{
outputFile = args[2];
}
Expand All @@ -104,15 +100,11 @@ binlogtool search *.binlog search string
return 0;
}

if (string.Equals(firstArg, "doublewrites", StringComparison.OrdinalIgnoreCase))
if (args.Length >= 2 && string.Equals(firstArg, "doublewrites", StringComparison.OrdinalIgnoreCase))
{
string binlog = null;
string binlog = binlog = args[1];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

string outputFile = null;
if (args.Length >= 2)
{
binlog = args[1];
}
else if (args.Length == 3)
if (args.Length == 3)
{
outputFile = args[2];
}
Expand Down