Skip to content

Commit 7518dc7

Browse files
mishamytehedger
andauthored
Returning fix for reading PWD locked MFUL (#4295)
Co-authored-by: hedger <hedger@users.noreply.github.com>
1 parent f4c92dc commit 7518dc7

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

lib/nfc/protocols/mf_ultralight/mf_ultralight_poller.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -566,16 +566,12 @@ static NfcCommand mf_ultralight_poller_handler_read_pages(MfUltralightPoller* in
566566
instance->error = mf_ultralight_poller_read_page(instance, start_page, &data);
567567
}
568568

569-
// Regression review
570-
const uint8_t read_cnt = instance->data->type == MfUltralightTypeMfulC ? 1 : 4;
571569
if(instance->error == MfUltralightErrorNone) {
572-
for(size_t i = 0; i < read_cnt; i++) {
573-
if(start_page + i < instance->pages_total) {
574-
FURI_LOG_D(TAG, "Read page %d success", start_page + i);
575-
instance->data->page[start_page + i] = data.page[i];
576-
instance->pages_read++;
577-
instance->data->pages_read = instance->pages_read;
578-
}
570+
if(start_page < instance->pages_total) {
571+
FURI_LOG_D(TAG, "Read page %d success", start_page);
572+
instance->data->page[start_page] = data.page[0];
573+
instance->pages_read++;
574+
instance->data->pages_read = instance->pages_read;
579575
}
580576

581577
if(instance->pages_read == instance->pages_total) {

0 commit comments

Comments
 (0)