summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2009-10-09 03:12:44 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:43 +0000
commit051c2dbb494611aa953609d366cc8c6c16916c87 (patch)
treed58e987c53d0e575b189d1af5597f5ef99605d9e /src/game
parent7161853405320ed0ccbb61fbf53fb4691fbd0623 (diff)
* Fix bans by IP address without a netmask (thanks Rezyn0)
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_utils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/g_utils.c b/src/game/g_utils.c
index 8b76704b..6655c2d4 100644
--- a/src/game/g_utils.c
+++ b/src/game/g_utils.c
@@ -991,8 +991,12 @@ qboolean G_AddressParse( const char *str, addr_t *addr, int *netmask )
*netmask = max;
}
}
- else if( *p )
- return qfalse;
+ else
+ {
+ if( *p )
+ return qfalse;
+ *subnet = max;
+ }
return qtrue;
}