]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdparser.c
client/cmdparser.c: Remove the leading spaces before calling the subparser. client...
[proxmark3-svn] / client / cmdparser.c
index 0f97d7feede67730d0b7ea4813972de0fdbc0ed9..4f6e24635b7f3afd97015d6ac1a7c2838e08532b 100644 (file)
@@ -50,9 +50,12 @@ void CmdsParse(const command_t Commands[], const char *Cmd)
     if(matches == 1) i=last_match;
   }
 
-  if (Commands[i].Name)
+  if (Commands[i].Name) {
+    while (Cmd[len] == ' ')
+      ++len;
     Commands[i].Parse(Cmd + len);
-  else
+  } else {
     // show help (always first in array) for selected hierarchy or if command not recognised
     CmdsHelp(Commands);
+  }
 }
Impressum, Datenschutz