From b749a13a5567b2fd9ed2098b0c57f7f4737e239f Mon Sep 17 00:00:00 2001 From: Antiklesys Date: Thu, 2 Apr 2026 23:44:59 +0800 Subject: [PATCH] Update secc.c --- armsrc/secc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/armsrc/secc.c b/armsrc/secc.c index 7ce89ef99..a5757fb40 100644 --- a/armsrc/secc.c +++ b/armsrc/secc.c @@ -237,10 +237,10 @@ bool hid_config_card_jam(const uint8_t *cmd, int len, uint8_t *dma_buf) { int off = (pcb & 0x08) ? 2 : 1; // skip CID if present // Select active APDU pattern and response (custom or default) - const uint8_t *match = (s_jam_apdu_len > 0) ? s_jam_apdu : s_jam_apdu_default; - int match_len = (s_jam_apdu_len > 0) ? (int)s_jam_apdu_len : (int)sizeof(s_jam_apdu_default); - const uint8_t *resp_data = (s_jam_resp_len > 0) ? s_jam_resp : s_jam_resp_default; - int resp_data_len = (s_jam_resp_len > 0) ? (int)s_jam_resp_len : (int)sizeof(s_jam_resp_default); + const uint8_t *match = (s_jam_apdu_len > 0) ? s_jam_apdu : s_jam_apdu_default; + int match_len = (s_jam_apdu_len > 0) ? (int)s_jam_apdu_len : (int)sizeof(s_jam_apdu_default); + const uint8_t *resp_data = (s_jam_resp_len > 0) ? s_jam_resp : s_jam_resp_default; + int resp_data_len = (s_jam_resp_len > 0) ? (int)s_jam_resp_len : (int)sizeof(s_jam_resp_default); if (len < off + match_len + 2) // off + APDU pattern + 2-byte CRC return false;