From b86b7efb10273e4a53915c3c797757fbf53050ca Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 17 Feb 2017 09:56:31 +0100 Subject: [PATCH] Fix number of blocks written A strange move changed the way written pages are bound in commit ed62b01a. As a result the last 3 blocks weren't written anymore. --- utils/nfc-mfultralight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/nfc-mfultralight.c b/utils/nfc-mfultralight.c index 4b9f39d..cfafad0 100644 --- a/utils/nfc-mfultralight.c +++ b/utils/nfc-mfultralight.c @@ -276,7 +276,7 @@ write_card(bool write_otp, bool write_lock, bool write_uid) } } - for (uint32_t page = uiSkippedPages; page <= ((uiBlocks / 4) * 4); page++) { + for (uint32_t page = uiSkippedPages; page <= uiBlocks; page++) { if ((page == 0x2) && (!write_lock)) { printf("s"); uiSkippedPages++;