mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-14 19:43:47 +00:00
tolerate errors when writing as well as reading
This commit is contained in:
@@ -405,7 +405,7 @@ write_card(int write_block_zero)
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
// Try to authenticate for the current sector
|
// Try to authenticate for the current sector
|
||||||
if (!write_block_zero && !authenticate(uiBlock)) {
|
if (!write_block_zero && !authenticate(uiBlock) && !bTolerateFailures) {
|
||||||
printf("!\nError: authentication failed for block %02x\n", uiBlock);
|
printf("!\nError: authentication failed for block %02x\n", uiBlock);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user