aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-08-03 04:20:25 +0000
committerEric Wong <normalperson@yhbt.net>2006-08-03 04:20:25 +0000
commit055e166619b1f8302b612b9ea69e39ccb876de72 (patch)
tree42a12612718fc2b4dd35ed09541d4f317129e531
parent31a81e2bcf2c027a8ea88d2ddbc4fc7ee75b9ad7 (diff)
downloadmpd-055e166619b1f8302b612b9ea69e39ccb876de72.tar.gz
mpd-055e166619b1f8302b612b9ea69e39ccb876de72.tar.xz
mpd-055e166619b1f8302b612b9ea69e39ccb876de72.zip
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
Diffstat (limited to '')
-rw-r--r--src/buffer2array.c3
1 files changed, 2 insertions, 1 deletions
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 {