aboutsummaryrefslogtreecommitdiffstats
path: root/code/game
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-11-02 23:36:23 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-11-02 23:36:23 +0000
commit56902c5a9b6b59341f71098566f2d84a4af4b572 (patch)
tree7c07b055412384790e939335a15c1fda78e05461 /code/game
parentc4ac4295935c145c992fdfd27085c3f95559c3a0 (diff)
downloadioquake3-aero-56902c5a9b6b59341f71098566f2d84a4af4b572.tar.gz
ioquake3-aero-56902c5a9b6b59341f71098566f2d84a4af4b572.zip
* (bug 3393) Blank user names still possible (Michael Jard <kfaust@gmail.com>)
* (bug 3363) Download percentage overflow (Martin Doucha <next_ghost@quick.cz>) * (bug 3390) MSVC project (Julian Priestley <juzley@gmail.com>) * For OS X and MinGW ports, don't -I code/SDL when USE_LOCAL_HEADERS is 0 git-svn-id: svn://svn.icculus.org/quake3/trunk@1204 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/game')
-rw-r--r--code/game/g_client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/code/game/g_client.c b/code/game/g_client.c
index 5414240..575d2e0 100644
--- a/code/game/g_client.c
+++ b/code/game/g_client.c
@@ -629,7 +629,7 @@ static void ClientCleanName( const char *in, char *out, int outSize ) {
}
// don't allow leading spaces
- if( !*p && ch == ' ' ) {
+ if( colorlessLen == 0 && ch == ' ' ) {
continue;
}
@@ -658,11 +658,15 @@ static void ClientCleanName( const char *in, char *out, int outSize ) {
}
// don't allow too many consecutive spaces
+ // don't count spaces in colorlessLen
if( ch == ' ' ) {
spaces++;
if( spaces > 3 ) {
continue;
}
+ *out++ = ch;
+ len++;
+ continue;
}
else {
spaces = 0;