aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2022-07-30 12:51:23 +0100
committerGitHub <noreply@github.com>2022-07-30 12:51:23 +0100
commita8711158896d993e23d823f41ab086c3915c7d4e (patch)
tree4883ab0310ec344883b8042dea3195cd73717c2e /src/network
parent6a269d58ef28be6428a5fb62c0eb966fc1ff5883 (diff)
downloadminetest-a8711158896d993e23d823f41ab086c3915c7d4e.tar.gz
minetest-a8711158896d993e23d823f41ab086c3915c7d4e.tar.bz2
minetest-a8711158896d993e23d823f41ab086c3915c7d4e.zip
Fix some warnings (#12615)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/serverpackethandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 4b9de488c..a5ee81a9c 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -108,8 +108,10 @@ void Server::handleCommand_Init(NetworkPacket* pkt)
// Use the highest version supported by both
u8 depl_serial_v = std::min(client_max, our_max);
// If it's lower than the lowest supported, give up.
+#if SER_FMT_VER_LOWEST_READ > 0
if (depl_serial_v < SER_FMT_VER_LOWEST_READ)
depl_serial_v = SER_FMT_VER_INVALID;
+#endif
if (depl_serial_v == SER_FMT_VER_INVALID) {
actionstream << "Server: A mismatched client tried to connect from " <<