Skip to content

Commit 1f74d46

Browse files
committed
AnalogController: Use proper upper bound when validating axis_code
1 parent 2e64f77 commit 1f74d46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/analog_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ std::optional<s32> AnalogController::GetButtonCodeByName(std::string_view button
6767

6868
void AnalogController::SetAxisState(s32 axis_code, float value)
6969
{
70-
if (axis_code < 0 || axis_code >= static_cast<s32>(Button::Count))
70+
if (axis_code < 0 || axis_code >= static_cast<s32>(Axis::Count))
7171
return;
7272

7373
// -1..1 -> 0..255

0 commit comments

Comments
 (0)