From 55db4dc6f2e2a46adb4d568d17c959360a651c96 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 20 Mar 2026 14:34:04 +0700 Subject: [PATCH] correct check if non secure mode is enabled --- client/src/cmdhficlass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index d5fd7569d..8d86d455d 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -3916,7 +3916,7 @@ static int CmdHFiClass_BlackTears(const char *Cmd) { #define TEAR_PERSO 0xAC #define TEAR_IS_PERSO_SET(x) (((x) & 0x80) == 0x80) - #define TEAR_IS_NONSECURE_SET(x) (((x) % 0x18) == 0x18) + #define TEAR_IS_NONSECURE_SET(x) ((((x) & 0x18) >> 3) == PICOPASS_NON_SECURE_PAGEMODE) #define TEAR_BAD(x) (((x) & 0x01) == 0) // perform initial read here, repeat if failed or 00s