summaryrefslogtreecommitdiff
path: root/src/class/mtp
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-12-12 21:38:48 +0700
committerhathach <[email protected]>2025-12-12 21:38:48 +0700
commitbb1495966d189dc2fb001bc9f3b7908a02a971bb (patch)
tree63c5044798267aa414a1073f3f7c3976cae65797 /src/class/mtp
parent686e975e4737e668577a66213910841036422752 (diff)
parent02da4e81c77fd7e77ff0b92c616519358c6db4ee (diff)
Merge branch 'refs/heads/master' into audio_open
Diffstat (limited to 'src/class/mtp')
-rw-r--r--src/class/mtp/mtp_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/class/mtp/mtp_device.c b/src/class/mtp/mtp_device.c
index 764019e42..4942a105a 100644
--- a/src/class/mtp/mtp_device.c
+++ b/src/class/mtp/mtp_device.c
@@ -422,10 +422,10 @@ bool mtpd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t
cb_data.total_xferred_bytes = p_mtp->xferred_len;
bool is_complete = false;
- // complete if ZLP or short packet or overflow
+ // complete if ZLP or short packet or total length reached
if (xferred_bytes == 0 || // ZLP
(xferred_bytes & (bulk_mps - 1)) || // short packet
- p_mtp->xferred_len > p_mtp->total_len) {
+ p_mtp->xferred_len >= p_mtp->total_len) { // total length reached
is_complete = true;
}