summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-19 22:24:34 +0000
committerrubidium <rubidium@openttd.org>2009-04-19 22:24:34 +0000
commit00686294327134df098c928a3b6aa0a0f97d67f5 (patch)
tree2aa672debab68320ee511ee97b20c5cc6662b42d
parentd02cdd91ca4c43bd79501fec48ab8279a03d0b06 (diff)
downloadopenttd-00686294327134df098c928a3b6aa0a0f97d67f5.tar.xz
(svn r16096) -Fix [FS#2849]: connect tried to validate too much of the company ID with too little information on hand
-rw-r--r--src/console_cmds.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 11417cccd..e928f1af2 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -778,8 +778,8 @@ DEF_CONSOLE_CMD(ConNetworkConnect)
/* From a user pov 0 is a new company, internally it's different and all
* companies are offset by one to ease up on users (eg companies 1-8 not 0-7) */
if (_network_playas != COMPANY_SPECTATOR) {
+ if (_network_playas > MAX_COMPANIES) return false;
_network_playas--;
- if (!IsValidCompanyID(_network_playas)) return false;
}
}
if (port != NULL) {