Browse Source

ILSpy should not crash if fullName contains no "/" - no version info

pull/2227/head
Bernd Baumanns 5 years ago
parent
commit
dd98de858d
  1. 9
      ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs

9
ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs

@ -44,7 +44,14 @@ namespace ICSharpCode.Decompiler.Metadata @@ -44,7 +44,14 @@ namespace ICSharpCode.Decompiler.Metadata
{
var parts = fullName.Split('/');
this.Name = parts[0];
this.Version = parts[1];
if (parts.Length > 1)
{
this.Version = parts[1];
} else
{
this.Version = "<UNKNOWN>";
}
this.Type = type;
this.Path = path;
this.RuntimeComponents = runtimeComponents ?? Empty<string>.Array;

Loading…
Cancel
Save