From cf41ebf93ae698eecf89e46d2f6565e81daeb830 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 1 Feb 2004 05:24:11 +0000 Subject: [PATCH] scope --- stepmania/src/ScreenSelectDifficulty.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenSelectDifficulty.cpp b/stepmania/src/ScreenSelectDifficulty.cpp index a1e0b317c3..8b624bd4b8 100644 --- a/stepmania/src/ScreenSelectDifficulty.cpp +++ b/stepmania/src/ScreenSelectDifficulty.cpp @@ -415,10 +415,11 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn ) /* This player is currently on a choice that is no longer available due to * the selection just made. */ int iSwitchToIndex = -1; - for( int i=m_iChoiceOnPage[p]+1; iSwitchToIndex == -1 && i < (int) m_ModeChoices[m_CurrentPage].size(); ++i ) + int i; + for( i=m_iChoiceOnPage[p]+1; iSwitchToIndex == -1 && i < (int) m_ModeChoices[m_CurrentPage].size(); ++i ) if( m_ModeChoices[m_CurrentPage][i].IsPlayable() ) iSwitchToIndex = i; - if( iSwitchToIndex == -1 ) + if( iSwitchToIndex == -1 ) /* couldn't find a spot looking up; look down */ { for( i=m_iChoiceOnPage[p]-1; iSwitchToIndex == -1 && i >= 0; --i ) if( m_ModeChoices[m_CurrentPage][i].IsPlayable() )