From 18fa1d7f37575d83e7e2592c6cc1f29267167c08 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Sun, 25 Sep 2022 18:09:37 +0200 Subject: [PATCH] Reseting previous command if new arrives. Signed-off-by: Pol Henarejos --- src/usb/hid/hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/usb/hid/hid.c b/src/usb/hid/hid.c index 888b66b..32820b3 100644 --- a/src/usb/hid/hid.c +++ b/src/usb/hid/hid.c @@ -332,6 +332,7 @@ void driver_exec_timeout() { uint8_t *driver_prepare_response() { ctap_resp = (CTAPHID_FRAME *)usb_get_tx(); apdu.rdata = ctap_resp->init.data; + send_buffer_size = 0; memset(usb_get_tx(), 0, 4096); return ctap_resp->init.data; }