Skip to content

Commit 9650656

Browse files
authored
Merge pull request #501 from GeneralsOnlineDevelopmentTeam/seer/fix/lan-game-options-index
bugfix(gui): Correct index usage in LanGameOptionsMenu for player info retrieval
2 parents 955933b + 4ac8b04 commit 9650656

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,14 @@ static void playerTooltip(GameWindow *window,
196196
if (idx == -1)
197197
return;
198198

199-
LANGameSlot *slot = TheLAN->GetMyGame()->getLANSlot(i);
199+
LANGameSlot *slot = TheLAN->GetMyGame()->getLANSlot(idx);
200200
if (!slot)
201201
return;
202202

203203
LANPlayer *player = slot->getUser();
204204
if (!player)
205205
{
206-
DEBUG_ASSERTCRASH(TheLAN->GetMyGame()->getIP(i) == 0, ("No player info in listbox!"));
206+
DEBUG_ASSERTCRASH(TheLAN->GetMyGame()->getIP(idx) == 0, ("No player info in listbox!"));
207207
TheMouse->setCursorTooltip( UnicodeString::TheEmptyString );
208208
return;
209209
}

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,14 @@ static void playerTooltip(GameWindow *window,
203203
if (idx == -1)
204204
return;
205205

206-
LANGameSlot *slot = TheLAN->GetMyGame()->getLANSlot(i);
206+
LANGameSlot *slot = TheLAN->GetMyGame()->getLANSlot(idx);
207207
if (!slot)
208208
return;
209209

210210
LANPlayer *player = slot->getUser();
211211
if (!player)
212212
{
213-
DEBUG_ASSERTCRASH(TheLAN->GetMyGame()->getIP(i) == 0, ("No player info in listbox!"));
213+
DEBUG_ASSERTCRASH(TheLAN->GetMyGame()->getIP(idx) == 0, ("No player info in listbox!"));
214214
TheMouse->setCursorTooltip( UnicodeString::TheEmptyString );
215215
return;
216216
}

0 commit comments

Comments
 (0)