diff options
author | LATRio <AlSenya@yandex.ru> | 2021-09-30 19:32:21 +0900 |
---|---|---|
committer | LATRio <AlSenya@yandex.ru> | 2021-09-30 19:32:21 +0900 |
commit | 41c1cfe28e8889e36cdd71141462b85174d8c261 (patch) | |
tree | 26f78a902204a5b140235d4b3e22bc9406bb0f28 /core/input | |
parent | 4a9a2315666ecdde98b2e0f61802b005b862203d (diff) |
InputEventJoypadMotion::set_axis - reject invalid axis
Diffstat (limited to 'core/input')
-rw-r--r-- | core/input/input_event.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/input/input_event.cpp b/core/input/input_event.cpp index c2a9d30fff..1d2b5f19ee 100644 --- a/core/input/input_event.cpp +++ b/core/input/input_event.cpp @@ -864,6 +864,8 @@ void InputEventMouseMotion::_bind_methods() { /////////////////////////////////// void InputEventJoypadMotion::set_axis(JoyAxis p_axis) { + ERR_FAIL_INDEX(p_axis, JOY_AXIS_MAX); + axis = p_axis; emit_changed(); } |