X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/ab7bb4947515be233282a404fe2e84549aca9579..7f0cb92e0d91031d30d1db92b6df9849571baeeb:/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; }