Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4b7241b authored by Zwei.chen's avatar Zwei.chen Committed by Jay Patel
Browse files

Fix the test case HCT BV-01-C

the value of p_dev->get_rpt_snt may become 255 after p_dev->get_rpt_snt--
if it happens to be 0

Bug: 138261469
parent 70e44374
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -571,7 +571,7 @@ void bta_hh_co_get_rpt_rsp(uint8_t dev_handle, uint8_t status, uint8_t* p_rpt,
  }

  // Send the HID report to the kernel.
  if (p_dev->fd >= 0 && p_dev->get_rpt_snt--) {
  if (p_dev->fd >= 0 && p_dev->get_rpt_snt > 0 && p_dev->get_rpt_snt--) {
    uint32_t* get_rpt_id =
        (uint32_t*)fixed_queue_dequeue(p_dev->get_rpt_id_queue);
    memset(&ev, 0, sizeof(ev));