summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-10-19 03:06:01 +0200
committerCharles Pigott <charlespigott@googlemail.com>2021-10-19 09:05:00 +0100
commit1c0700e0c0aa233b8850eba8358862f44574856d (patch)
treebfb2d9f89a8d1e0ee4ef16997fcbe2819d34970e /src/network
parent14429bbe8a323f25deb72d4586d5ce6ee23b5a78 (diff)
downloadopenttd-1c0700e0c0aa233b8850eba8358862f44574856d.tar.xz
Fix #9624: compilation with RANDOM_DEBUG
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_client.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index 22f7278f3..bc5f24ac3 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -858,7 +858,11 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_FRAME(Packet *p
#ifdef ENABLE_NETWORK_SYNC_EVERY_FRAME
/* Test if the server supports this option
* and if we are at the frame the server is */
- if (p->pos + 1 < p->size) {
+#ifdef NETWORK_SEND_DOUBLE_SEED
+ if (p->CanReadFromPacket(sizeof(uint32) + sizeof(uint32))) {
+#else
+ if (p->CanReadFromPacket(sizeof(uint32))) {
+#endif
_sync_frame = _frame_counter_server;
_sync_seed_1 = p->Recv_uint32();
#ifdef NETWORK_SEND_DOUBLE_SEED