]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhflegic.c
Merge branch 'master' of https://github.com/iceman1001/proxmark3
[proxmark3-svn] / client / cmdhflegic.c
index da1b20b1cd422b46f7a8a3c3a7910c5d1d3a9ffd..731cead1097a5f80b0c56c104bfe81346b75b702 100644 (file)
@@ -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;
                }
Impressum, Datenschutz