Skip to content

Commit

Permalink
update hash function
Browse files Browse the repository at this point in the history
  • Loading branch information
Priscillalala committed Dec 29, 2023
1 parent 18248b5 commit 5720ec9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R2API.ProcType/ProcTypeAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,21 +361,21 @@ private static bool[] NetworkReadModdedMask(NetworkReader reader)
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static byte ModdedMaskHashCode(bool[] mask)
private static int ModdedMaskHashCode(bool[] mask)
{
byte b = 0;
int result = 0;
if (mask != null)
{
int length = Math.Min(mask.Length, 8);
int length = Math.Min(mask.Length, 32);
for (int i = 0; i < length; i++)
{
if (mask[i])
{
b |= (byte)(1 << i);
result |= 1 << i;
}
}
}
return b;
return result;
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
Expand Down

0 comments on commit 5720ec9

Please sign in to comment.