From 23e5d20eedcf7522cefd26b0c37809d5ddcf2d13 Mon Sep 17 00:00:00 2001 From: "adam@algroup.co.uk" Date: Mon, 8 Mar 2010 14:20:05 +0000 Subject: [PATCH 1/1] strip trailing space in a more strictly correct place --- client/proxmark3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/proxmark3.c b/client/proxmark3.c index 17534558..98b28c3c 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -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); } -- 2.39.5