changeset 9659 | 187142ff9b6c |
parent 9652 | 0405e98d8e96 |
child 9751 | 9e9c726170cc |
--- a/src/cheat_gui.cpp Fri Jul 18 16:26:51 2008 +0000 +++ b/src/cheat_gui.cpp Fri Jul 18 16:40:29 2008 +0000 @@ -44,8 +44,8 @@ */ static int32 ClickChangePlayerCheat(int32 p1, int32 p2) { - while (IsValidPlayerID((PlayerID)p1)) { - if (_players[p1].is_active) { + while ((uint)p1 < GetPlayerPoolSize()) { + if (IsValidPlayerID((PlayerID)p1)) { SetLocalPlayer((PlayerID)p1); MarkWholeScreenDirty();