From: iceman1001 Date: Sun, 14 Feb 2016 14:24:11 +0000 (+0100) Subject: CHG: clearCommandBuffer(); before calling cmdparser. X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/4c36581b96dfb81c85f34a4229d82e51edeaf499 CHG: clearCommandBuffer(); before calling cmdparser. --- diff --git a/client/cmddata.c b/client/cmddata.c index ab89bb30..23863131 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -2411,8 +2411,8 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdData(const char *Cmd) -{ +int CmdData(const char *Cmd){ + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdhf.c b/client/cmdhf.c index f6fb3a99..be842a34 100644 --- a/client/cmdhf.c +++ b/client/cmdhf.c @@ -783,14 +783,13 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdHF(const char *Cmd) -{ - CmdsParse(CommandTable, Cmd); - return 0; +int CmdHF(const char *Cmd) { + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } -int CmdHelp(const char *Cmd) -{ - CmdsHelp(CommandTable); - return 0; +int CmdHelp(const char *Cmd) { + CmdsHelp(CommandTable); + return 0; } diff --git a/client/cmdhw.c b/client/cmdhw.c index 03f4186f..11112118 100644 --- a/client/cmdhw.c +++ b/client/cmdhw.c @@ -473,8 +473,8 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdHW(const char *Cmd) -{ +int CmdHW(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdlf.c b/client/cmdlf.c index 924e0fea..29fe6f12 100644 --- a/client/cmdlf.c +++ b/client/cmdlf.c @@ -1236,14 +1236,13 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdLF(const char *Cmd) -{ - CmdsParse(CommandTable, Cmd); - return 0; +int CmdLF(const char *Cmd) { + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } -int CmdHelp(const char *Cmd) -{ - CmdsHelp(CommandTable); - return 0; +int CmdHelp(const char *Cmd) { + CmdsHelp(CommandTable); + return 0; } diff --git a/client/cmdlfawid.c b/client/cmdlfawid.c index 4a200139..d98dee4f 100644 --- a/client/cmdlfawid.c +++ b/client/cmdlfawid.c @@ -255,6 +255,7 @@ static command_t CommandTable[] = { }; int CmdLFAWID(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdlfem4x.c b/client/cmdlfem4x.c index 4eaabef3..25cc075b 100644 --- a/client/cmdlfem4x.c +++ b/client/cmdlfem4x.c @@ -611,14 +611,13 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdLFEM4X(const char *Cmd) -{ +int CmdLFEM4X(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } -int CmdHelp(const char *Cmd) -{ +int CmdHelp(const char *Cmd) { CmdsHelp(CommandTable); return 0; } diff --git a/client/cmdlfhid.c b/client/cmdlfhid.c index 85d72b67..ff25d07e 100644 --- a/client/cmdlfhid.c +++ b/client/cmdlfhid.c @@ -372,6 +372,7 @@ static command_t CommandTable[] = { }; int CmdLFHID(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdlfhitag.c b/client/cmdlfhitag.c index 81822eb6..95d85c6e 100644 --- a/client/cmdlfhitag.c +++ b/client/cmdlfhitag.c @@ -267,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; } diff --git a/client/cmdlfio.c b/client/cmdlfio.c index aa21c44b..5c70f99d 100644 --- a/client/cmdlfio.c +++ b/client/cmdlfio.c @@ -73,14 +73,13 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdLFIO(const char *Cmd) -{ - CmdsParse(CommandTable, Cmd); - return 0; +int CmdLFIO(const char *Cmd){ + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } -int CmdHelp(const char *Cmd) -{ - CmdsHelp(CommandTable); - return 0; +int CmdHelp(const char *Cmd) { + CmdsHelp(CommandTable); + return 0; } diff --git a/client/cmdlfpcf7931.c b/client/cmdlfpcf7931.c index 23efd2e7..5cc576fe 100644 --- a/client/cmdlfpcf7931.c +++ b/client/cmdlfpcf7931.c @@ -165,14 +165,13 @@ static command_t CommandTable[] = {NULL, NULL, 0, NULL} }; -int CmdLFPCF7931(const char *Cmd) -{ +int CmdLFPCF7931(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } -int CmdHelp(const char *Cmd) -{ +int CmdHelp(const char *Cmd) { CmdsHelp(CommandTable); return 0; } diff --git a/client/cmdlfpresco.c b/client/cmdlfpresco.c index e6ac19e4..20b42bc1 100644 --- a/client/cmdlfpresco.c +++ b/client/cmdlfpresco.c @@ -212,6 +212,7 @@ static command_t CommandTable[] = { }; int CmdLFPresco(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdlft55xx.c b/client/cmdlft55xx.c index 7684bcc7..d104d7d7 100644 --- a/client/cmdlft55xx.c +++ b/client/cmdlft55xx.c @@ -1550,11 +1550,12 @@ static command_t CommandTable[] = { }; int CmdLFT55XX(const char *Cmd) { - CmdsParse(CommandTable, Cmd); - return 0; + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } int CmdHelp(const char *Cmd) { - CmdsHelp(CommandTable); - return 0; + CmdsHelp(CommandTable); + return 0; } diff --git a/client/cmdlfti.c b/client/cmdlfti.c index 66b2cd8b..29168787 100644 --- a/client/cmdlfti.c +++ b/client/cmdlfti.c @@ -298,11 +298,12 @@ static command_t CommandTable[] = { }; int CmdLFTI(const char *Cmd){ - CmdsParse(CommandTable, Cmd); - return 0; + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } int CmdHelp(const char *Cmd){ - CmdsHelp(CommandTable); - return 0; + CmdsHelp(CommandTable); + return 0; } diff --git a/client/cmdlfviking.c b/client/cmdlfviking.c index 6d3362f7..b91aced8 100644 --- a/client/cmdlfviking.c +++ b/client/cmdlfviking.c @@ -126,6 +126,7 @@ static command_t CommandTable[] = { }; int CmdLFViking(const char *Cmd) { + clearCommandBuffer(); CmdsParse(CommandTable, Cmd); return 0; } diff --git a/client/cmdscript.c b/client/cmdscript.c index 730f4e96..b8c97158 100644 --- a/client/cmdscript.c +++ b/client/cmdscript.c @@ -98,10 +98,10 @@ int CmdList(const char *Cmd) * @param Cmd * @return */ -int CmdScript(const char *Cmd) -{ - CmdsParse(CommandTable, Cmd); - return 0; +int CmdScript(const char *Cmd) { + clearCommandBuffer(); + CmdsParse(CommandTable, Cmd); + return 0; } /** * Utility to check the ending of a string (used to check file suffix)