Fix parsing bots in arena info with trailing spaces

q3_ui would shown bot at index of number of bots in list.
game would send empty name to addbot command and command would think skill
(i.e., 2.000000) was the bot name.
This commit is contained in:
Zack Middleton 2015-01-12 20:54:10 -06:00
parent 9c4b75c499
commit daa604ae9b
3 changed files with 3 additions and 3 deletions

View File

@ -817,7 +817,7 @@ static void G_SpawnBots( char *botList, int baseDelay ) {
while( *p && *p == ' ' ) {
p++;
}
if( !p ) {
if( !*p ) {
break;
}

View File

@ -183,7 +183,7 @@ static void UI_SPLevelMenu_SetBots( void ) {
while( *p && *p == ' ' ) {
p++;
}
if( !p ) {
if( !*p ) {
break;
}

View File

@ -1076,7 +1076,7 @@ static void ServerOptions_InitBotNames( void ) {
while( *p && *p == ' ' ) {
p++;
}
if( !p ) {
if( !*p ) {
break;
}