(svn r14038) -Fix [FS#2211] (r13731): company limit was not properly enforced for CMD_PLAYER_CTRL.

This commit is contained in:
rubidium
2008-08-10 19:00:33 +00:00
parent 110a9f8fc0
commit b3a15a3983
2 changed files with 7 additions and 3 deletions

View File

@@ -516,9 +516,9 @@ void ResetPlayerLivery(Player *p)
*/
Player *DoStartupNewPlayer(bool is_ai)
{
Player *p = new Player(STR_SV_UNNAMED, is_ai);
if (!Player::CanAllocateItem()) return NULL;
if (p == NULL) return NULL;
Player *p = new Player(STR_SV_UNNAMED, is_ai);
memset(&_players_ai[p->index], 0, sizeof(PlayerAI));
memset(&_players_ainew[p->index], 0, sizeof(PlayerAiNew));