[FL-3856] Don't crash on reading weird cards (#3717)

* Don't crash on reading weird cards
* mf plus: fix incorrect read fail event handler

Co-authored-by: gornekich <n.gorbadey@gmail.com>
This commit is contained in:
Astra
2024-06-17 22:18:53 +09:00
committed by GitHub
parent bda6d4f75a
commit ecd324dd1c
2 changed files with 8 additions and 3 deletions

View File

@@ -41,8 +41,7 @@ static NfcCommand nfc_scene_read_poller_callback_mf_plus(NfcGenericEvent event,
view_dispatcher_send_custom_event(instance->view_dispatcher, NfcCustomEventPollerSuccess);
command = NfcCommandStop;
} else if(mf_plus_event->type == MfPlusPollerEventTypeReadFailed) {
view_dispatcher_send_custom_event(instance->view_dispatcher, NfcCustomEventPollerFailure);
command = NfcCommandStop;
command = NfcCommandReset;
}
return command;