diff --git a/libnfc/buses/uart_win32.c b/libnfc/buses/uart_win32.c index 19acc1f..18685fa 100644 --- a/libnfc/buses/uart_win32.c +++ b/libnfc/buses/uart_win32.c @@ -151,7 +151,7 @@ uart_receive (serial_port sp, byte_t * pbtRx, const size_t szRx, void * abort_p) volatile bool * abort_flag_p = (volatile bool *)abort_p; do { - res = ReadFile (((serial_port_windows *) sp)->hPort, pbtRx + received_bytes_count, + res = ReadFile (((serial_port_windows *) sp)->hPort, pbtRx + dwTotalBytesReceived, dwBytesToGet, &dwBytesReceived, NULL);