From 3db159cf598538cec20ed1aea6a7d54bdb13cee6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 18 Sep 2003 19:07:10 +0000 Subject: [PATCH] Fix P2 crash. --- stepmania/src/ScreenOptions.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 676dac1984..b0b5cf593e 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -476,6 +476,10 @@ void ScreenOptions::UpdateText( PlayerNumber player_no, int iRow ) const OptionRow &row = m_OptionRow[iRow]; unsigned item_no = row.bOneChoiceForAllPlayers?0:player_no; + + /* If player_no is 2 and there is no player 1: */ + item_no = min( item_no, m_textItems[iRow].size()-1 ); + m_textItems[iRow][item_no]->SetText( m_OptionRow[iRow].choices[iChoiceInRow] ); }