From 4986959706e4681c7d6468ba8ce7d566e846ff6e Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 9 Oct 2023 15:48:01 +0200 Subject: [PATCH] fix logic for epurse updates --- armsrc/iclass.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/armsrc/iclass.c b/armsrc/iclass.c index a1631d95d..405ad610f 100644 --- a/armsrc/iclass.c +++ b/armsrc/iclass.c @@ -1892,9 +1892,7 @@ void iClass_WriteBlock(uint8_t *msg) { res = false; goto out; } - } - - if ((pagemap != PICOPASS_NON_SECURE_PAGEMODE) && (payload->req.blockno == 3 || payload->req.blockno == 4)) { + } else if ((pagemap != PICOPASS_NON_SECURE_PAGEMODE) && (payload->req.blockno == 3 || payload->req.blockno == 4)) { // check response. Key updates always return 0xffffffffffffffff uint8_t all_ff[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; if (memcmp(all_ff, resp, sizeof(all_ff))) {