From 11d8a5343c7aa76b8b32d0ec1ffc3e70ecb0eb13 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Fri, 23 May 2025 20:17:57 +0200 Subject: [PATCH] Remove the tweak for packets multiple of 64 bytes. It was fixed in the USB stack handling (don't remember where). Fixes #95. Signed-off-by: Pol Henarejos --- src/apdu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apdu.c b/src/apdu.c index 20ec597..25dd279 100644 --- a/src/apdu.c +++ b/src/apdu.c @@ -224,9 +224,10 @@ void apdu_finish() { put_uint16_t_be(apdu.sw, apdu.rdata + apdu.rlen); // timeout_stop(); #ifndef ENABLE_EMULATION - if ((apdu.rlen + 2 + 10) % 64 == 0) { // FIX for strange behaviour with PSCS and multiple of 64 - apdu.ne = apdu.rlen - 2; - } + /* It was fixed in the USB handling. Keep it just in case */ + //if ((apdu.rlen + 2 + 10) % 64 == 0) { // FIX for strange behaviour with PSCS and multiple of 64 + // apdu.ne = apdu.rlen - 2; + //} #endif }