diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index be1985ed7..2ded59c41 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -441,7 +441,7 @@ static bool hf_mfdes_try_parse_hrt(DesfireContext_t *dctx) { // Check that application info parses before reading other files const char *application_id = hrt_travelcard_get_application_instance_id(&card); - if (application_id == NULL && application_id[0] == '\0') { + if (application_id == NULL || application_id[0] == '\0') { hrt_travelcard_free(&card); return false; }