From 372a82570b3a30ba3714bee9fbafbfe757439dc0 Mon Sep 17 00:00:00 2001 From: marshmellow42 Date: Wed, 6 May 2015 10:17:39 -0400 Subject: [PATCH] MFU adj to allow 0 len returns on raw cmds --- client/cmdhfmfu.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.39.5