From 055e166619b1f8302b612b9ea69e39ccb876de72 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 3 Aug 2006 04:20:25 +0000 Subject: 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 --- src/buffer2array.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buffer2array.c b/src/buffer2array.c index 322036df0..39fc29bc9 100644 --- a/src/buffer2array.c +++ b/src/buffer2array.c @@ -41,7 +41,8 @@ int cstrtok(char *buffer, char *array[], const int max) *(c++) = '\0'; break; } - } + } else if (*c == '\\' && escape) + memmove(c - 1, c, strlen(c) + 1); escape = (*(c++) != '\\') ? 0 : !escape; } } else { -- cgit v1.2.3