fix: Changes IPAddress comparison to use UInt128 (#1897)

This commit is contained in:
Kamron Batman 2024-08-04 09:32:41 -07:00 • committed by GitHub
parent 83db1f91f6
commit 4d47b3849f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 13 deletions

View file

@ -324,17 +324,10 @@ public class HouseRaffleManagementGump : Gump
return 1;
}
var a = x.Address.GetAddressBytes();
var b = y.Address.GetAddressBytes();
for (var i = 0; i < a.Length && i < b.Length; i++)
var addressCompare = x.Address.ToUInt128().CompareTo(y.Address.ToUInt128());
if (addressCompare != 0)
{
var compare = a[i].CompareTo(b[i]);
if (compare != 0)
{
return compare;
}
return addressCompare;
}
return x.Date.CompareTo(y.Date);