From d7de914a775b93937002434a8e1387f33d456596 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Wed, 3 Jan 2007 05:40:19 +0000 Subject: [PATCH] Fix crash when pushing other buttons. I don't really like this. Some of the paths through StepStrumHopo can handle col = -1 but others lead to crashes. Maybe it should be refactored so that all code touching col is separate from the Strum code where col is -1. --- stepmania/src/ScreenGameplay.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 202918c711..5e2cab8834 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -2223,10 +2223,12 @@ void ScreenGameplay::Input( const InputEventPlus &input ) case GameButtonType_INVALID: break; case GameButtonType_Step: - pi.m_pPlayer->Step( iCol, -1, input.DeviceI.ts, false, bRelease ); + if( iCol != -1 ) + pi.m_pPlayer->Step( iCol, -1, input.DeviceI.ts, false, bRelease ); break; case GameButtonType_Fret: - pi.m_pPlayer->Fret( iCol, -1, input.DeviceI.ts, false, bRelease ); + if( iCol != -1 ) + pi.m_pPlayer->Fret( iCol, -1, input.DeviceI.ts, false, bRelease ); break; case GameButtonType_Strum: pi.m_pPlayer->Strum( iCol, -1, input.DeviceI.ts, false, bRelease );