summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-14 12:30:31 +0000
committertron <tron@openttd.org>2006-06-14 12:30:31 +0000
commit3d41cb23d415cb4f39f8e0e5214e01ed73f2b945 (patch)
tree0f367c8dfe4900f4b385d1f9eac1c576ba4ef351
parent7d2efe3d846823b4305c573f47dae3e1d6ceed46 (diff)
downloadopenttd-3d41cb23d415cb4f39f8e0e5214e01ed73f2b945.tar.xz
(svn r5264) -Fix: The wrong IP could get unbanned, e.g. 'unban 1.2.3.42' could result in unbanning 1.2.3.4
-rw-r--r--console_cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/console_cmds.c b/console_cmds.c
index 1afda2d2e..0994f3258 100644
--- a/console_cmds.c
+++ b/console_cmds.c
@@ -440,7 +440,7 @@ DEF_CONSOLE_CMD(ConUnBan)
for (i = 0; i < lengthof(_network_ban_list); i++) {
if (_network_ban_list[i] == NULL) continue;
- if (strncmp(_network_ban_list[i], argv[1], strlen(_network_ban_list[i])) == 0 || index == i) {
+ if (strcmp(_network_ban_list[i], argv[1]) == 0 || index == i) {
free(_network_ban_list[i]);
_network_ban_list[i] = NULL;
IConsolePrint(_icolour_def, "IP unbanned.");