Skip to content

Commit bcc1899

Browse files
authored
Merge pull request #508 from SpiritsUnite/back-button
Fix out of bounds access on back button input
2 parents 0d5f793 + f79a8b1 commit bcc1899

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Main/src/Input.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ void Input::m_OnButtonInput(Button b, bool pressed)
400400
}
401401

402402
static Timer t;
403-
if(b >= Button::LS_0Neg)
403+
if(b >= Button::LS_0Neg && b <= Button::LS_1Pos)
404404
{
405405
int32 btnIdx = (int32)b - (int32)Button::LS_0Neg;
406406
int32 laserIdx = btnIdx / 2;

0 commit comments

Comments
 (0)