mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-16 04:37:55 -04:00
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:
+6
-1
@@ -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")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user