diff options
Diffstat (limited to 'src/cheat_gui.cpp')
-rw-r--r-- | src/cheat_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 1d4ca80cb..482f4bc41 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -44,8 +44,8 @@ static int32 ClickMoneyCheat(int32 p1, int32 p2) */ 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(); |