Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix NullReferenceException when not supplying any args to jit-dasm
  • Loading branch information
jakobbotsch committed Jan 10, 2023
commit 7efb5309bbd9b60a9b2cc54080cf3d7e7ea4bfd0
18 changes: 10 additions & 8 deletions src/jit-dasm/JitDasmRootCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,17 @@ public JitDasmRootCommand(string[] args) : base("Managed codegen diff tool (cros
{
errors.Add("Can't find --crossgen tool.");
}

string crossgenFilename = Path.GetFileNameWithoutExtension(crossgen).ToLower();
if (crossgenFilename == "crossgen")
{
CodeGeneratorV1 = true;
}
else if (crossgenFilename != "crossgen2")
else
{
errors.Add("--crossgen tool should be crossgen or crossgen2.");
string crossgenFilename = Path.GetFileNameWithoutExtension(crossgen).ToLower();
if (crossgenFilename == "crossgen")
{
CodeGeneratorV1 = true;
}
else if (crossgenFilename != "crossgen2")
{
errors.Add("--crossgen tool should be crossgen or crossgen2.");
}
}

if (Result.FindResultFor(Filename) == null && Result.GetValue(AssemblyList).Count == 0)
Expand Down