]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
strip trailing space in a more strictly correct place
authoradam@algroup.co.uk <adam@algroup.co.uk@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Mon, 8 Mar 2010 14:20:05 +0000 (14:20 +0000)
committeradam@algroup.co.uk <adam@algroup.co.uk@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Mon, 8 Mar 2010 14:20:05 +0000 (14:20 +0000)
client/proxmark3.c

index 17534558bbd9c17ee9a8390c568252ab84ac315e..98b28c3cb981243f5256dfd1669b7c8d914f067c 100644 (file)
@@ -64,9 +64,9 @@ static void *main_loop(void *targ)
   while(1) {
     cmd = readline(PROXPROMPT);
     if (cmd) {
+      while(cmd[strlen(cmd) - 1] == ' ')
+        cmd[strlen(cmd) - 1] = 0x00;
       if (cmd[0] != 0x00) {
-        while(cmd[strlen(cmd) - 1] == ' ')
-          cmd[strlen(cmd) - 1]= 0x00;
         CommandReceived(cmd);
         add_history(cmd);
       }
Impressum, Datenschutz