From c432de825e81744a50389414fc71c0d2bbf6f5f9 Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Mon, 1 Dec 2014 11:38:20 +0000 Subject: [PATCH] fix shell git-svn-id: svn://kolibrios.org@5207 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/shell/modules/module_command.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/programs/system/shell/modules/module_command.c b/programs/system/shell/modules/module_command.c index d50f0d49d6..55b535d6e6 100644 --- a/programs/system/shell/modules/module_command.c +++ b/programs/system/shell/modules/module_command.c @@ -301,10 +301,7 @@ if (quote == 0) { cmd[i] = CMD[i]; if (0 == cmd[i]) - { - i = -2; - break; - } + return i; if ( iswhite(cmd[i]) ) { cmd[i] = '\0'; @@ -321,7 +318,7 @@ if (quote == 0) cmd[len] = CMD[i]; if (0 == cmd[len]) { - len = -2; + i--; break; } if ( cmd[len] == '"' ) @@ -332,7 +329,7 @@ if (quote == 0) len++; } trim(cmd); - return len+2; + return i+1; } }