Skip to content

Commit

Permalink
Fix parsing bots in arena info with trailing spaces
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zturtleman committed Jan 13, 2015
1 parent 9c4b75c commit daa604a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/game/g_bot.c
Expand Up @@ -817,7 +817,7 @@ static void G_SpawnBots( char *botList, int baseDelay ) {
while( *p && *p == ' ' ) {
p++;
}
if( !p ) {
if( !*p ) {
break;
}

Expand Down
2 changes: 1 addition & 1 deletion code/q3_ui/ui_splevel.c
Expand Up @@ -183,7 +183,7 @@ static void UI_SPLevelMenu_SetBots( void ) {
while( *p && *p == ' ' ) {
p++;
}
if( !p ) {
if( !*p ) {
break;
}

Expand Down
2 changes: 1 addition & 1 deletion code/q3_ui/ui_startserver.c
Expand Up @@ -1076,7 +1076,7 @@ static void ServerOptions_InitBotNames( void ) {
while( *p && *p == ' ' ) {
p++;
}
if( !p ) {
if( !*p ) {
break;
}

Expand Down

0 comments on commit daa604a

Please sign in to comment.