From 1b922b809609d5cb8c1db525648b277c8d89634c Mon Sep 17 00:00:00 2001 From: Harald Wolff Date: Wed, 9 Dec 2020 13:00:22 +0100 Subject: [PATCH] SemVersion: fix operators >/< --- ln.build/semver/SemVersion.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ln.build/semver/SemVersion.cs b/ln.build/semver/SemVersion.cs index 2a4e591..9464d96 100644 --- a/ln.build/semver/SemVersion.cs +++ b/ln.build/semver/SemVersion.cs @@ -2,8 +2,10 @@ using System; using System.IO; +using System.Runtime.InteropServices.ComTypes; using System.Text; using System.Text.RegularExpressions; +using Jint.Parser.Ast; using ln.build.semver; using Microsoft.VisualBasic; @@ -81,6 +83,9 @@ namespace ln.build.semver public static bool operator <(SemVersion a,SemVersion b) { + if (a is null || b is null) + return false; + if (a.Major < b.Major) return true; if (a.Major > b.Major) @@ -108,6 +113,9 @@ namespace ln.build.semver } public static bool operator >(SemVersion b,SemVersion a) { + if (a is null || b is null) + return false; + if (a.Major < b.Major) return true; if (a.Major > b.Major)