summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2013-07-12 17:11:16 +0000
committerplanetmaker <planetmaker@openttd.org>2013-07-12 17:11:16 +0000
commit2e390613a6c5854b62215ada489ef0c792a6507f (patch)
tree064e65ab70328914f86b1c99a5d71c9d6e33dd14 /src/network/core
parent7686587f02ff76bb7d6f899b989701adeda5b6e4 (diff)
downloadopenttd-2e390613a6c5854b62215ada489ef0c792a6507f.tar.xz
(svn r25589) -Fix [FS#5646]: Ensure that sent and received length of json strings are the same (based on patch by Xaroth)
Diffstat (limited to 'src/network/core')
-rw-r--r--src/network/core/config.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/core/config.h b/src/network/core/config.h
index cbe4f5d74..08a93ea70 100644
--- a/src/network/core/config.h
+++ b/src/network/core/config.h
@@ -48,7 +48,7 @@ static const uint NETWORK_PASSWORD_LENGTH = 33; ///< The maximum lengt
static const uint NETWORK_CLIENTS_LENGTH = 200; ///< The maximum length for the list of clients that controls a company, in bytes including '\0'
static const uint NETWORK_CLIENT_NAME_LENGTH = 25; ///< The maximum length of a client's name, in bytes including '\0'
static const uint NETWORK_RCONCOMMAND_LENGTH = 500; ///< The maximum length of a rconsole command, in bytes including '\0'
-static const uint NETWORK_GAMESCRIPT_JSON_LENGTH = 1450; ///< The maximum length of a gamescript json string, in bytes including '\0'
+static const uint NETWORK_GAMESCRIPT_JSON_LENGTH = SEND_MTU - 3; ///< The maximum length of a gamescript json string, in bytes including '\0'. Must not be longer than SEND_MTU including header (3 bytes)
static const uint NETWORK_CHAT_LENGTH = 900; ///< The maximum length of a chat message, in bytes including '\0'
static const uint NETWORK_GRF_NAME_LENGTH = 80; ///< Maximum length of the name of a GRF