fix hw status (and USB comm in general) (#434)
[proxmark3-svn] / client / proxmark3.c
index d0e68b6121a32086d8109badf8f768a28c154eee..f7a87f6d27ae86a491362eab5b522c9fae8eb519 100644 (file)
@@ -73,12 +73,11 @@ static void *uart_receiver(void *targ) {
 
        while (arg->run) {
                rxlen = 0;
-               if (uart_receive(sp, prx, sizeof(UsbCommand) - (prx-rx), &rxlen)) {
+               if (uart_receive(sp, prx, sizeof(UsbCommand) - (prx-rx), &rxlen) && rxlen) {
                        prx += rxlen;
                        if (prx-rx < sizeof(UsbCommand)) {
                                continue;
                        }
-                       
                        UsbCommandReceived((UsbCommand*)rx);
                }
                prx = rx;
Impressum, Datenschutz