mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
fixed packet length calculation bug, re-enabled deck selection
This commit is contained in:
parent
314f17091d
commit
38e4781624
7 changed files with 30 additions and 11 deletions
|
|
@ -102,7 +102,10 @@ void ServerSocketInterface::readClient()
|
|||
do {
|
||||
if (!messageInProgress) {
|
||||
if (inputBuffer.size() >= 4) {
|
||||
messageLength = (int) (((quint32) inputBuffer[0]) << 24) + (((quint32) inputBuffer[1]) << 16) + (((quint32) inputBuffer[2]) << 8) + ((quint32) inputBuffer[3]);
|
||||
messageLength = (((quint32) (unsigned char) inputBuffer[0]) << 24)
|
||||
+ (((quint32) (unsigned char) inputBuffer[1]) << 16)
|
||||
+ (((quint32) (unsigned char) inputBuffer[2]) << 8)
|
||||
+ ((quint32) (unsigned char) inputBuffer[3]);
|
||||
inputBuffer.remove(0, 4);
|
||||
messageInProgress = true;
|
||||
} else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue