From 2e630f7e0f56b7d22c027c73dc5f9c114625d515 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Tue, 10 May 2011 17:02:33 +0000 Subject: [PATCH] windows port: fix uart_receive() under Win32 platform --- libnfc/buses/uart_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);