Skip to content

Commit

Permalink
Cap major and minor fallback versions to 65535. This isn't great, but…
Browse files Browse the repository at this point in the history
… is really the best compromise I can come up with.
  • Loading branch information
wasabii committed Oct 30, 2023
1 parent 712c2e1 commit f47df71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemResolve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,9 @@ Version ToAssemblyVersion(string version)
try
{
var v = new DefaultArtifactVersion(version);
return new Version(v.getMajorVersion(), v.getMinorVersion());
var major = v.getMajorVersion() <= ushort.MaxValue ? v.getMajorVersion() : ushort.MaxValue;
var minor = v.getMinorVersion() <= ushort.MaxValue ? v.getMinorVersion() : ushort.MaxValue;
return new Version(major, minor);
}
catch (Exception)
{
Expand Down

0 comments on commit f47df71

Please sign in to comment.