]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/proxmark3.c
move trailing space stripping to client/proxmark3.c (per discussion on r426)
[proxmark3-svn] / client / proxmark3.c
index 77c37715893b94a928f12bc0965b65a4c9eb0223..17534558bbd9c17ee9a8390c568252ab84ac315e 100644 (file)
@@ -1,3 +1,14 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2009 Michael Gernoth <michael at gernoth.net>
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// Main binary
+//-----------------------------------------------------------------------------
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -35,6 +46,7 @@ static void *usb_receiver(void *targ)
   }
 
   pthread_exit(NULL);
+  return NULL;
 }
 
 static void *main_loop(void *targ)
@@ -53,6 +65,8 @@ static void *main_loop(void *targ)
     cmd = readline(PROXPROMPT);
     if (cmd) {
       if (cmd[0] != 0x00) {
+        while(cmd[strlen(cmd) - 1] == ' ')
+          cmd[strlen(cmd) - 1]= 0x00;
         CommandReceived(cmd);
         add_history(cmd);
       }
@@ -70,6 +84,7 @@ static void *main_loop(void *targ)
 
   ExitGraphics();
   pthread_exit(NULL);
+  return NULL;
 }
 
 int main(int argc, char **argv)
Impressum, Datenschutz