diff --git a/client/src/cmdhffelica.c b/client/src/cmdhffelica.c index 6ed000b8d..eaac8e4cb 100644 --- a/client/src/cmdhffelica.c +++ b/client/src/cmdhffelica.c @@ -610,6 +610,7 @@ static bool waitCmdFelicaEx(bool iSelect, PacketResponseNG *resp, bool verbose, if (logging) { PrintAndLogEx(WARNING, "CRC ( " _RED_("fail") " )"); } + return false; } if (resp->data.asBytes[0] != 0xB2 || resp->data.asBytes[1] != 0x4D) { @@ -795,8 +796,7 @@ static int CmdHFFelicaReader(const char *Cmd) { if (cm) { PrintAndLogEx(INFO, "Press " _GREEN_("") " to exit"); } - - CLIParserFree(ctx); + return read_felica_uid(cm, verbose); } @@ -4201,7 +4201,7 @@ static int felica_internal_authentication( return PM3_ERFTRANS; } - if (res.status_flags.status_flag1[0] != 0x00 && res.status_flags.status_flag2[0] != 0x00) { + if (res.status_flags.status_flag1[0] != 0x00 || res.status_flags.status_flag2[0] != 0x00) { PrintAndLogEx(ERR, "\nError RC Write"); return PM3_ERFTRANS; } @@ -4330,7 +4330,7 @@ static int felica_external_authentication( return PM3_ERFTRANS; } - if (res.status_flags.status_flag1[0] != 0x00 && res.status_flags.status_flag2[0] != 0x00) { + if (res.status_flags.status_flag1[0] != 0x00 || res.status_flags.status_flag2[0] != 0x00) { PrintAndLogEx(ERR, "\nExternal Authenticate: " _RED_("Failed")); return PM3_ERFTRANS; }