Take care of 16-blocks-long sectors of Mifare Classic 4K in the nfc-mfclassic example's blocks counting routine.

This commit is contained in:
Romain Tartiere 2010-08-11 09:26:22 +00:00
parent 3ec0b9376c
commit f237d44339

View file

@ -65,8 +65,8 @@ static void
print_success_or_failure (bool bFailure, uint32_t * uiBlockCounter) print_success_or_failure (bool bFailure, uint32_t * uiBlockCounter)
{ {
printf ("%c", (bFailure) ? 'x' : '.'); printf ("%c", (bFailure) ? 'x' : '.');
if (uiBlockCounter) if (uiBlockCounter && !bFailure)
*uiBlockCounter += (bFailure) ? 0 : 4; *uiBlockCounter += (*uiBlockCounter < 128) ? 4 : 16;
} }
static bool static bool