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.

This commit is contained in:
Steve Checkoway
2007-01-03 05:40:19 +00:00
parent c8d83fc337
commit d7de914a77
+4 -2
View File
@@ -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 );