From fe42979b79c1a3d7915ac6f5b844815a13394f15 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 1 Dec 2003 21:44:33 +0000 Subject: [PATCH] fix crash pressing left/right when on "EXIT" --- stepmania/src/ScreenOptions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 325b83ee28..e0482117f2 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -814,7 +814,7 @@ void ScreenOptions::ChangeValue( PlayerNumber pn, int iDelta, bool Repeat ) int iCurRow = m_iCurrentRow[pn]; OptionRow &row = m_OptionRow[iCurRow]; - const int iNumOptions = row.choices.size(); + const int iNumOptions = (iCurRow == m_iNumOptionRows)? 1: row.choices.size(); if( PREFSMAN->m_bArcadeOptionsNavigation ) { /* If START is being pressed, and arcade nav is on, then we're holding left/right @@ -823,7 +823,7 @@ void ScreenOptions::ChangeValue( PlayerNumber pn, int iDelta, bool Repeat ) INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_START) ) ) return; - if( iCurRow == m_iNumOptionRows || iNumOptions <= 1 ) // 1 or 0 + if( iNumOptions <= 1 ) // 1 or 0 { Move( pn, iDelta, Repeat ); return;