Skip to content

Commit

Permalink
[BT] Fix memory card read on Android
Browse files Browse the repository at this point in the history
Closes #277
  • Loading branch information
darthcloud committed May 25, 2022
1 parent afe124a commit 819efad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main/bluetooth/att.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,9 @@ static void bt_att_cmd_mc_rd_rsp(uint16_t handle, uint8_t blob) {

len = (block * 4096) - mc_offset;

if (len > (mtu - 1)) {
len = mtu - 1;
if (len > (mtu - 2)) {
len = mtu - 2;
len &= 0xFFFFFFFC;
}

mc_read(mc_offset, bt_hci_pkt_tmp.att_data, len);
Expand Down

0 comments on commit 819efad

Please sign in to comment.