From 94fe58d020424f88d613c0a98dd0fbbf6ca84f29 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Thu, 24 Jan 2019 20:09:57 +0200 Subject: [PATCH] small fix --- targets/stm32l432/src/nfc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/stm32l432/src/nfc.c b/targets/stm32l432/src/nfc.c index 3590d5d..b4f26f0 100644 --- a/targets/stm32l432/src/nfc.c +++ b/targets/stm32l432/src/nfc.c @@ -77,7 +77,7 @@ bool nfc_write_response_ex(uint8_t req0, uint8_t * data, uint8_t len, uint16_t r res[0] = NFC_CMD_IBLOCK | (req0 & 3); - if (len) + if (len && data) memcpy(&res[1], data, len); res[len + 1] = resp >> 8; @@ -222,7 +222,7 @@ void nfc_process_iblock(uint8_t * buf, int len) ctap_response_init(&ctap_resp); status = ctap_request(payload, plen, &ctap_resp); - printf1(TAG_NFC, "status: %d\r\n", status); + printf1(TAG_NFC, "CTAP resp: %d len: %d\r\n", status, ctap_resp.length); if (status == CTAP1_ERR_SUCCESS) {