From 6cf243075c276b3cb445cb64b449610bff1b5b4b Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Sun, 21 Jul 2019 04:43:49 -0500 Subject: [PATCH] Fixed infinite recursion --- IPA.Loader/Utilities/AlmostVersion.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPA.Loader/Utilities/AlmostVersion.cs b/IPA.Loader/Utilities/AlmostVersion.cs index 67563424..c9e81279 100644 --- a/IPA.Loader/Utilities/AlmostVersion.cs +++ b/IPA.Loader/Utilities/AlmostVersion.cs @@ -206,8 +206,8 @@ namespace IPA.Utilities /// public static bool operator==(AlmostVersion l, AlmostVersion r) { - if (l == null && r == null) return true; - if (l == null || r == null) return false; + if (ReferenceEquals(l, null) && ReferenceEquals(r, null)) return true; + if (ReferenceEquals(l, null) || ReferenceEquals(r, null)) return false; if (l.StorageMode != r.StorageMode) return false; if (l.StorageMode == StoredAs.SemVer) return Utils.VersionCompareNoPrerelease(l.SemverValue, r.SemverValue) == 0;