summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-26 16:39:02 +0000
committerrubidium <rubidium@openttd.org>2011-08-26 16:39:02 +0000
commit4836a6e50e94978e2f363d586838cea2bdb9c26e (patch)
tree14c32b2f0aa2dde2384308d54a3c0c65a4c2735f /src/network
parent9975f30eb76025ba911323f75e06b5f7d6e2e4a5 (diff)
downloadopenttd-4836a6e50e94978e2f363d586838cea2bdb9c26e.tar.xz
(svn r22845) -Fix [FS#4745]: perform stricter checks on some commands (monoid)
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_command.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp
index 27e8338fb..0e37eeff4 100644
--- a/src/network/network_command.cpp
+++ b/src/network/network_command.cpp
@@ -308,7 +308,7 @@ const char *NetworkGameSocketHandler::ReceiveCommand(Packet *p, CommandPacket *c
if (!IsValidCommand(cp->cmd)) return "invalid command";
if (GetCommandFlags(cp->cmd) & CMD_OFFLINE) return "offline only command";
if ((cp->cmd & CMD_FLAGS_MASK) != 0) return "invalid command flag";
- if (callback > lengthof(_callback_table)) return "invalid callback";
+ if (callback >= lengthof(_callback_table)) return "invalid callback";
cp->callback = _callback_table[callback];
return NULL;