Remove extra bit in BasicAttackBehavior write (#1039)

This commit is contained in:
David Markowitz 2023-04-01 02:45:29 -07:00 committed by GitHub
parent 152c8ea712
commit 49d695a153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,7 +147,7 @@ void BasicAttackBehavior::Calculate(BehaviorContext* context, RakNet::BitStream*
DoBehaviorCalculation(context, bitStream, branch); DoBehaviorCalculation(context, bitStream, branch);
const auto endAddress = bitStream->GetWriteOffset(); const auto endAddress = bitStream->GetWriteOffset();
const uint16_t allocate = endAddress - startAddress + 1; const uint16_t allocate = endAddress - startAddress;
bitStream->SetWriteOffset(allocatedAddress); bitStream->SetWriteOffset(allocatedAddress);
bitStream->Write(allocate); bitStream->Write(allocate);