X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/5f7e30f8d52794f6e09e07f0bd078d565f801994..e719470c461e38fb3ad99416d06fa1b5b19ff357:/client/cmdhflegic.c diff --git a/client/cmdhflegic.c b/client/cmdhflegic.c index da1b20b1..731cead1 100644 --- a/client/cmdhflegic.c +++ b/client/cmdhflegic.c @@ -527,8 +527,7 @@ int CmdLegicRfRawWrite(const char *Cmd) { PrintAndLog("# changing the DCF is irreversible #"); PrintAndLog("#####################################"); PrintAndLog("do youe really want to continue? y(es) n(o)"); - scanf(" %c", &answer); - if (answer == 'y' || answer == 'Y') { + if (scanf(" %c", &answer) > 0 && (answer == 'y' || answer == 'Y')) { SendCommand(&c); return 0; }