Commit 055e1666 authored by Eric Wong's avatar Eric Wong

buffer2array: oops, we forgot to take into account that \ is escaped, too

Any escaped instances of \ must already be inside an already quoted string, though. git-svn-id: https://svn.musicpd.org/mpd/trunk@4539 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 31a81e2b
...@@ -41,7 +41,8 @@ int cstrtok(char *buffer, char *array[], const int max) ...@@ -41,7 +41,8 @@ int cstrtok(char *buffer, char *array[], const int max)
*(c++) = '\0'; *(c++) = '\0';
break; break;
} }
} } else if (*c == '\\' && escape)
memmove(c - 1, c, strlen(c) + 1);
escape = (*(c++) != '\\') ? 0 : !escape; escape = (*(c++) != '\\') ? 0 : !escape;
} }
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment