summaryrefslogtreecommitdiff
path: root/platform/x11/joypad_linux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/joypad_linux.cpp')
-rw-r--r--platform/x11/joypad_linux.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp
index e6328ee14d..4242952374 100644
--- a/platform/x11/joypad_linux.cpp
+++ b/platform/x11/joypad_linux.cpp
@@ -513,6 +513,8 @@ void JoypadLinux::process_joypads() {
break;
default:
+ if (ev.code >= MAX_ABS)
+ return;
if (joy->abs_map[ev.code] != -1 && joy->abs_info[ev.code]) {
InputDefault::JoyAxis value = axis_correct(joy->abs_info[ev.code], ev.value);
joy->curr_axis[joy->abs_map[ev.code]] = value;