From fd28999845e08192ec04a0265337d5e252db7e4b Mon Sep 17 00:00:00 2001 From: Salvador Cipolla Date: Fri, 10 Apr 2026 20:49:45 -0300 Subject: [PATCH] Fix compareTo never returning -1 (C5 fix) --- Knossos.NET/Classes/SemanticVersion.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Knossos.NET/Classes/SemanticVersion.cs b/Knossos.NET/Classes/SemanticVersion.cs index a12754b7..9b430729 100644 --- a/Knossos.NET/Classes/SemanticVersion.cs +++ b/Knossos.NET/Classes/SemanticVersion.cs @@ -387,7 +387,8 @@ public int CompareTo(object? other) { if (other == null) return 1; - return this > (SemanticVersion)other ? 1 : 0; + + return Compare(this, (SemanticVersion)other); } } }