From 187075190ab5115a0fec5508d5fe72555fe82a6d Mon Sep 17 00:00:00 2001 From: z4yx Date: Thu, 10 Aug 2023 23:57:24 +0800 Subject: [PATCH] reset clock ticks in nfc test mode --- src/apdu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apdu.c b/src/apdu.c index 6ffcb30e..2449fda6 100644 --- a/src/apdu.c +++ b/src/apdu.c @@ -219,6 +219,8 @@ void process_apdu(CAPDU *capdu, RAPDU *rapdu) { #ifdef TEST if (CLA == 0x00 && INS == 0xEE && LC == 0x04 && memcmp(DATA, "\x12\x56\xAB\xF0", 4) == 0) { printf("MAGIC REBOOT command received!\r\n"); + testmode_set_initial_ticks(0); + testmode_set_initial_ticks(device_get_tick()); ctap_install(0); SW = 0x9000; LL = 0;