Fix incorrect pointer increment

When encountering a backslash character the memmove() call removes it.  But then the pointer p should only be incremented by 1 to skip the escaped character rather than 2, which also skips the character following the escaped one.
This commit is contained in:
duncan-mcewan
2020-04-29 07:47:18 +12:00
committed by Jeffrey Altman
parent 70ac849844
commit 72055a2911

View File

@@ -248,7 +248,7 @@ sl_make_argv(char *line, int *ret_argc, char ***ret_argv)
if (p[1] == '\0')
goto failed;
memmove(&p[0], &p[1], strlen(&p[1]) + 1);
p += 2;
p += 1;
continue;
} else if (quote || !isspace((unsigned char)*p)) {
p++;