diff --git a/RiptideNetworking/RiptideNetworking/Message.cs b/RiptideNetworking/RiptideNetworking/Message.cs index 29b7954a..41330bb0 100644 --- a/RiptideNetworking/RiptideNetworking/Message.cs +++ b/RiptideNetworking/RiptideNetworking/Message.cs @@ -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; } @@ -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; }