X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/aeb128e2bb62d6a2e8fdb571d99c6ac8f9c6ff27..5147ec695991384578073c93d65e268f852b59c7:/client/cmdhflegic.c?ds=sidebyside 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; }