summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--daemon/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/device.c b/daemon/device.c
index 0a143b2..8c786a7 100644
--- a/daemon/device.c
+++ b/daemon/device.c
@@ -576,7 +576,7 @@ void device_data_input(struct usb_device *usbdev, unsigned char *buffer, uint32_
}
memcpy(dev->pktbuf + dev->pktlen, buffer, length);
struct mux_header *mhdr = (struct mux_header *)dev->pktbuf;
- if((length < USB_MRU) || (ntohl(mhdr->length) == length)) {
+ if((length < USB_MRU) || (ntohl(mhdr->length) == (length + dev->pktlen))) {
buffer = dev->pktbuf;
length += dev->pktlen;
dev->pktlen = 0;