Skip to content

Commit b8661f3

Browse files
committed
another small fix for the "255/28 pages read" bug
1 parent b59549a commit b8661f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/nfc/protocols/felica/felica_poller.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ NfcCommand felica_poller_state_handler_read_success(FelicaPoller* instance) {
437437
if((!instance->auth.context.auth_status.internal ||
438438
!instance->auth.context.auth_status.external) &&
439439
instance->data->workflow_type == FelicaLite) {
440-
instance->data->blocks_read--;
440+
if(instance->data->blocks_read != 0) {
441+
instance->data->blocks_read--;
442+
}
441443
instance->felica_event.type = FelicaPollerEventTypeIncomplete;
442444
} else {
443445
memcpy(

0 commit comments

Comments
 (0)