fix shell

git-svn-id: svn://kolibrios.org@5207 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2014-12-01 11:38:20 +00:00
parent 7e04b7813d
commit c432de825e

View File

@ -301,10 +301,7 @@ if (quote == 0)
{ {
cmd[i] = CMD[i]; cmd[i] = CMD[i];
if (0 == cmd[i]) if (0 == cmd[i])
{ return i;
i = -2;
break;
}
if ( iswhite(cmd[i]) ) if ( iswhite(cmd[i]) )
{ {
cmd[i] = '\0'; cmd[i] = '\0';
@ -321,7 +318,7 @@ if (quote == 0)
cmd[len] = CMD[i]; cmd[len] = CMD[i];
if (0 == cmd[len]) if (0 == cmd[len])
{ {
len = -2; i--;
break; break;
} }
if ( cmd[len] == '"' ) if ( cmd[len] == '"' )
@ -332,7 +329,7 @@ if (quote == 0)
len++; len++;
} }
trim(cmd); trim(cmd);
return len+2; return i+1;
} }
} }