AnalogController: Use proper upper bound when validating axis_code

This commit is contained in:
Albert Liu 2020-05-26 23:23:44 -07:00
parent 2e64f77d2b
commit 1f74d46d39
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ std::optional<s32> AnalogController::GetButtonCodeByName(std::string_view button
void AnalogController::SetAxisState(s32 axis_code, float value)
{
if (axis_code < 0 || axis_code >= static_cast<s32>(Button::Count))
if (axis_code < 0 || axis_code >= static_cast<s32>(Axis::Count))
return;
// -1..1 -> 0..255