From e1e689e2664110a7fe45b1d1cb4bfd9656e4c05d Mon Sep 17 00:00:00 2001 From: Antiklesys Date: Fri, 3 Apr 2026 03:32:00 +0800 Subject: [PATCH] Fixed bug causing retries loop to be skipped Fixed bug causing retries loop to be skipped --- armsrc/iclass.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/armsrc/iclass.c b/armsrc/iclass.c index 8a894ee5f..e8c2d7295 100644 --- a/armsrc/iclass.c +++ b/armsrc/iclass.c @@ -3187,12 +3187,13 @@ fast_restore: Dbhexdump(8, fast_restore_key, false); Dbprintf(_RED_("Attempted to restore original key for %3d times and failed. Stopping. Card is likely unusable."), revert_retries); } - if (recovered) { + if (recovered && reverted) { goto restore; - } else { + } else if (revert_retries >= 7) { goto out; } } + goto out; restore: ;// empty statement for compilation