From: Iceman Date: Tue, 2 Aug 2016 08:14:01 +0000 (+0200) Subject: Merge pull request #17 from alexgrin/iceman_master X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/ab981f05819e3b4b368e50f5729951a33f5ce8de?hp=981aefe33dc0fe53eb03828e559eb6d37c6a9573 Merge pull request #17 from alexgrin/iceman_master Fixing warning: --- diff --git a/client/cmdhflegic.c b/client/cmdhflegic.c index ccdfa1da..0adf3c59 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; }