(svn r5264) -Fix: The wrong IP could get unbanned, e.g. 'unban 1.2.3.42' could result in unbanning 1.2.3.4
authortron
Wed, 14 Jun 2006 12:30:31 +0000
changeset 4025 489430d5cdec
parent 4024 636df31c7aff
child 4026 f6faccd92b1c
(svn r5264) -Fix: The wrong IP could get unbanned, e.g. 'unban 1.2.3.42' could result in unbanning 1.2.3.4
console_cmds.c
--- a/console_cmds.c	Wed Jun 14 11:26:56 2006 +0000
+++ b/console_cmds.c	Wed Jun 14 12:30:31 2006 +0000
@@ -440,7 +440,7 @@
 	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.");