diff options
Diffstat (limited to 'wirish')
-rw-r--r-- | wirish/usb_serial.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wirish/usb_serial.cpp b/wirish/usb_serial.cpp index d4a8148..e2cdee3 100644 --- a/wirish/usb_serial.cpp +++ b/wirish/usb_serial.cpp @@ -109,8 +109,8 @@ uint32 USBSerial::read(void *buf, uint32 len) { uint32 bytes_in = 0; while (len > 0) { - uint32 new_bytes = usbReceiveBytes(&(uint8)buf[new_bytes], len); - len -= newBytes; + uint32 new_bytes = usbReceiveBytes((uint8*)((uint8*)buf+bytes_in), len); + len -= new_bytes; bytes_in += new_bytes; } |