From 7a78467d7275feff0fe166845d995a93114f3807 Mon Sep 17 00:00:00 2001 From: Chomp Date: Thu, 3 Jul 2025 10:36:18 +0100 Subject: [PATCH] Fixed login error --- Libraries/SPTarkov.Server.Core/Models/Common/MongoId.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Models/Common/MongoId.cs b/Libraries/SPTarkov.Server.Core/Models/Common/MongoId.cs index 5ce6ba3b..6f7af548 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Common/MongoId.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Common/MongoId.cs @@ -5,7 +5,7 @@ namespace SPTarkov.Server.Core.Models.Common; public readonly struct MongoId : IEquatable { - private readonly string _stringId; + private readonly string? _stringId; public MongoId( string? id, @@ -18,7 +18,7 @@ public readonly struct MongoId : IEquatable // This is temporary, otherwise item buying is broken as when LINQ searches for string id's it's possible null is passed if (string.IsNullOrEmpty(id)) { - _stringId = string.Intern("000000000000000000000000"); + _stringId = null; return; } @@ -136,7 +136,7 @@ public readonly struct MongoId : IEquatable public override int GetHashCode() { - return _stringId.GetHashCode(); + return (_stringId ?? string.Empty).GetHashCode(); } public bool IsEmpty()