From 07bfef1550c3cbdcd2d52ff1fa67d8f49b23af2e Mon Sep 17 00:00:00 2001 From: Antiklesys Date: Fri, 23 May 2025 17:11:07 +0800 Subject: [PATCH] Bugfixes on hf iclass trbl Fixed tearoff trigger staying enabled in case of keyboard interruption --- client/src/cmdhficlass.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 13725b392..d98c1e1c1 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -3191,6 +3191,14 @@ out: if (setDeviceDebugLevel(verbose ? MAX(dbg_curr, DBG_INFO) : DBG_NONE, false) != PM3_SUCCESS) { return PM3_EFAILED; } + // disable tearoff in case of keyboard abort, or it'll trigger on next operation + clearCommandBuffer(); + tearoff_params_t params = { + .delay_us = tearoff_start, + .on = false, + .off = true + }; + handle_tearoff(¶ms, false); PrintAndLogEx(NORMAL, ""); return isok; }