From 339e8a791075ac75ec08d0c82615414dc5394130 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 16 Jul 2024 00:03:00 +0300 Subject: [PATCH] Kernel: Fix USB keyboard state updating with variable reports --- kernel/kernel/USB/HID/Keyboard.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/kernel/USB/HID/Keyboard.cpp b/kernel/kernel/USB/HID/Keyboard.cpp index 9c38af010f..40b96bafab 100644 --- a/kernel/kernel/USB/HID/Keyboard.cpp +++ b/kernel/kernel/USB/HID/Keyboard.cpp @@ -80,6 +80,8 @@ namespace Kernel dprintln_if(DEBUG_KEYBOARD, "Unsupported keyboard usage page {2H}", usage_page); return; } + if (!state) + return; if (usage >= 4 && usage < m_keyboard_state_temp.size()) m_keyboard_state_temp[usage] = state; }