diff --git a/lib/nfc/nfc_worker.c b/lib/nfc/nfc_worker.c index c33f2fa2a..10494193f 100644 --- a/lib/nfc/nfc_worker.c +++ b/lib/nfc/nfc_worker.c @@ -451,7 +451,7 @@ void nfc_worker_emulate_mf_ultralight(NfcWorker* nfc_worker) { if(emulator.auth_attempted) { nfc_worker->event_data = &emulator.auth_attempt; if(nfc_worker->callback) { - nfc_worker->callback(NfcWorkerEventPwdAuth, nfc_worker->context); + nfc_worker->callback(NfcWorkerEventMfUltralightPwdAuth, nfc_worker->context); } emulator.auth_attempted = false; nfc_worker->event_data = NULL; diff --git a/lib/nfc/nfc_worker.h b/lib/nfc/nfc_worker.h index ef5213ad7..290d3d741 100644 --- a/lib/nfc/nfc_worker.h +++ b/lib/nfc/nfc_worker.h @@ -61,8 +61,8 @@ typedef enum { NfcWorkerEventDetectReaderMfkeyCollected, // Mifare Ultralight events - NfcWorkerEventMfUltralightPassKey, - NfcWorkerEventPwdAuth, + NfcWorkerEventMfUltralightPassKey, // NFC worker requesting manual key + NfcWorkerEventMfUltralightPwdAuth, // Reader sent auth command } NfcWorkerEvent; typedef bool (*NfcWorkerCallback)(NfcWorkerEvent event, void* context); diff --git a/lib/nfc/protocols/mifare_ultralight.c b/lib/nfc/protocols/mifare_ultralight.c index c11ebf77c..034ea4f74 100644 --- a/lib/nfc/protocols/mifare_ultralight.c +++ b/lib/nfc/protocols/mifare_ultralight.c @@ -1713,7 +1713,7 @@ bool mf_ul_prepare_emulation_response( &buff_rx[1], sizeof(emulator->auth_attempt.pwd.raw)); emulator->auth_attempted = true; - + uint16_t scaled_authlim = mf_ultralight_calc_auth_count(&emulator->data); if(scaled_authlim != 0 && emulator->data.curr_authlim >= scaled_authlim) { if(emulator->data.curr_authlim != UINT16_MAX) {