summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-10-15 23:31:22 +0000
committerDarkvater <darkvater@openttd.org>2006-10-15 23:31:22 +0000
commit4bb6587f405307a15631585519eb642431a83219 (patch)
tree05ad3afaa9ac5cb26ca51f4c2709b6522b9076cf
parenta01ae2bafe1c02da3e53fb6195578e1620129292 (diff)
downloadopenttd-4bb6587f405307a15631585519eb642431a83219.tar.xz
(svn r6783) -Codechange: Allow ParseConnectionString to allow players with more than one digit
-rw-r--r--network.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/network.c b/network.c
index 19e8fd451..6e43323c2 100644
--- a/network.c
+++ b/network.c
@@ -527,8 +527,10 @@ void ParseConnectionString(const char **player, const char **port, char *connect
char *p;
for (p = connection_string; *p != '\0'; p++) {
if (*p == '#') {
- *player = p + 1;
*p = '\0';
+ *player = ++p;
+ while (IsValidAsciiChar(*p, CS_NUMERAL)) p++;
+ if (*p == '\0') break;
} else if (*p == ':') {
*port = p + 1;
*p = '\0';