diff -r f5c4d3c04b5d -r 187142ff9b6c src/cheat_gui.cpp --- 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();