summaryrefslogtreecommitdiff
path: root/net/network.cpp
diff options
context:
space:
mode:
authorHello=) <hello@themanaworld.org>2025-04-13 13:00:18 +0300
committerHello=) <hello@themanaworld.org>2025-04-13 13:00:18 +0300
commita7e8dd71a8caa90cb637d3ebda4a60e7d0982aa1 (patch)
treef998dcf5b1cded8462b7376dc816dd3d8d08f942 /net/network.cpp
parentac4306a8ca7267f6353d14bc39d7427e5167c492 (diff)
downloadguildbot-master.tar.gz
guildbot-master.tar.bz2
guildbot-master.tar.xz
guildbot-master.zip
Two fixes based on actual fallout and its debugging.HEADmaster
1) Fix #ifdef DEBUG in net/network.cpp to actually work. 2) Fix parsing of 0x215 Quest Variables packet. Who told its fixed len 4? Its variable len and seems.
Diffstat (limited to 'net/network.cpp')
-rw-r--r--net/network.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/network.cpp b/net/network.cpp
index e4c6e65..cf46651 100644
--- a/net/network.cpp
+++ b/net/network.cpp
@@ -73,7 +73,7 @@ short packet_lengths[] = {
-1, -1, 20, 10, 32, 9, 34, 14, 2, 6, 48, 56, -1, 4, 5, 10,
// #0x200
26, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
const unsigned int BUFFER_SIZE = 65536;
@@ -296,7 +296,7 @@ MessageIn Network::getNextMessage()
len = readWord(2);
#ifdef DEBUG
- printf("Received packet 0x%x of length %d\n", msgId, length);
+ printf("Received packet 0x%x of length %d\n", msgId, len);
#endif
MessageIn msg(mInBuffer, len);