Bugfix: Correctly handle missing ending double quotes (+test) (Thanks mxf)

This commit is contained in:
Michael Stapelberg
2012-02-10 19:49:38 +00:00
parent 2daa8d422a
commit 82247fd0ab
2 changed files with 5 additions and 1 deletions

View File

@ -249,7 +249,7 @@ char *parse_command(const char *input) {
if (*walk == '"') {
beginning++;
walk++;
while (*walk != '"' || *(walk-1) == '\\')
while (*walk != '\0' && (*walk != '"' || *(walk-1) == '\\'))
walk++;
} else {
if (token->name[0] == 's') {