From: marshmellow42 Date: Wed, 6 May 2015 14:17:39 +0000 (-0400) Subject: MFU adj to allow 0 len returns on raw cmds X-Git-Tag: v2.1.0~12^2~35 X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/372a82570b3a30ba3714bee9fbafbfe757439dc0 MFU adj to allow 0 len returns on raw cmds --- diff --git a/client/cmdhfmfu.c b/client/cmdhfmfu.c index a94d8767..e24e3fad 100644 --- a/client/cmdhfmfu.c +++ b/client/cmdhfmfu.c @@ -107,6 +107,7 @@ static int ul_send_cmd_raw( uint8_t *cmd, uint8_t cmdlen, uint8_t *response, uin SendCommand(&c); UsbCommand resp; if (!WaitForResponseTimeout(CMD_ACK, &resp, 1500)) return -1; + if (!resp.arg[0] && responseLength) return -1; uint16_t resplen = (resp.arg[0] < responseLength) ? resp.arg[0] : responseLength; memcpy(response, resp.d.asBytes, resplen);