strip trailing space in a more strictly correct place

This commit is contained in:
adam@algroup.co.uk 2010-03-08 14:20:05 +00:00
parent 9cb00f305c
commit 23e5d20eed

View 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);
}