From 41c1cfe28e8889e36cdd71141462b85174d8c261 Mon Sep 17 00:00:00 2001 From: LATRio Date: Thu, 30 Sep 2021 19:32:21 +0900 Subject: InputEventJoypadMotion::set_axis - reject invalid axis --- core/input/input_event.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/input') 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(); } -- cgit v1.2.3