Use correct hashcode for identity (#45)

* Use correct hashcode for Identity

* Sneak a tostring fix into this branch

---------

Co-authored-by: Derek Brinkmann <dbrinkmann@citadelstudios.net>
This commit is contained in:
Alessandro Asoni
2023-07-31 18:12:12 +02:00
committed by GitHub
parent ab1a0c5f19
commit 368dca287c
+6 -1
View File
@@ -68,7 +68,12 @@ namespace SpacetimeDB
throw new InvalidOperationException("Cannot hash on null bytes.");
}
return bytes.GetHashCode();
return BitConverter.ToInt32(bytes, 0);
}
public override string ToString()
{
return string.Concat(bytes.Select(b => b.ToString("x2")));
}
}
}