fix on esp_hidh report map length checking function

Closes https://github.com/espressif/esp-idf/issues/7586
pull/8353/head
jincheng 2021-12-24 15:21:48 +08:00
rodzic 214d62b9ad
commit 629bd67001
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -639,7 +639,7 @@ esp_hidh_dev_report_t *esp_hidh_dev_get_input_report_by_proto_and_data(esp_hidh_
}
r = dev->reports;
while (r) {
if (r->value_len == len + 1 && r->report_id == *data && (r->report_type & 1) &&
if (r->value_len == len - 1 && r->report_id == *data && (r->report_type & 1) &&
r->protocol_mode == protocol_mode) {
*has_report_id = true;
break;