1
0
Fork 0

Protocol 1.8: fix plugin message payload read size (#5324)

* Read the entire payload of an unhandled vanilla plugin message, remove -1 offset. This was forgotten by #5085
* Fixes #5322
This commit is contained in:
Tiger Wang 2021-11-14 18:18:59 +00:00 committed by GitHub
parent d49ce751ba
commit 95bc2eac22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2880,7 +2880,7 @@ void cProtocol_1_8_0::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, con
// Read the payload and send it through to the clienthandle:
ContiguousByteBuffer Message;
VERIFY(a_ByteBuffer.ReadSome(Message, a_ByteBuffer.GetReadableSpace() - 1));
VERIFY(a_ByteBuffer.ReadSome(Message, a_ByteBuffer.GetReadableSpace()));
m_Client->HandlePluginMessage(a_Channel, Message);
}