Skip to content

Commit

Permalink
Fix AddShorts and AddUShorts not using writeBit
Browse files Browse the repository at this point in the history
  • Loading branch information
xzippyzachx committed Dec 16, 2023
1 parent c6ff82c commit bdd09c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RiptideNetworking/RiptideNetworking/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ public Message AddShorts(short[] array, bool includeLength = true)

for (int i = 0; i < array.Length; i++)
{
Converter.ShortToBits(array[i], data, readBit);
Converter.ShortToBits(array[i], data, writeBit);
writeBit += sizeof(short) * BitsPerByte;
}

Expand All @@ -960,7 +960,7 @@ public Message AddUShorts(ushort[] array, bool includeLength = true)

for (int i = 0; i < array.Length; i++)
{
Converter.UShortToBits(array[i], data, readBit);
Converter.UShortToBits(array[i], data, writeBit);
writeBit += sizeof(ushort) * BitsPerByte;
}

Expand Down

0 comments on commit bdd09c3

Please sign in to comment.