- if (uart_receive(sp,rx,&rxlen)) {
- if ((rxlen % sizeof(UsbCommand)) != 0) {
- PrintAndLog("ERROR: received %zd bytes, which does not seem to be one or more command(s)\n",rxlen);
+ if (uart_receive(sp,prx,&rxlen)) {
+ prx += rxlen;
+ if (((prx-rx) % sizeof(UsbCommand)) != 0) {