X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/ab7bb4947515be233282a404fe2e84549aca9579..805cd07e25811b87b48c4258b57e24445d385551:/client/cmdlfhitag.c diff --git a/client/cmdlfhitag.c b/client/cmdlfhitag.c index bd2e47a8..95d85c6e 100644 --- a/client/cmdlfhitag.c +++ b/client/cmdlfhitag.c @@ -173,7 +173,8 @@ int CmdLFHitagSim(const char *Cmd) { return 1; } tag_mem_supplied = true; - if (fread(c.d.asBytes,48,1,pf) == 0) { + size_t bytes_read = fread(c.d.asBytes, 48, 1, pf); + if ( bytes_read == 0) { PrintAndLog("Error: File reading error"); fclose(pf); return 1; @@ -266,14 +267,13 @@ static command_t CommandTable[] = { {NULL, NULL, 0, NULL} }; -int CmdLFHitag(const char *Cmd) -{ +int CmdLFHitag(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } -int CmdHelp(const char *Cmd) -{ +int CmdHelp(const char *Cmd) { CmdsHelp(CommandTable); return 0; }