1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

Fix bug in template code.

Signed-off-by: Brenden Matthews <brenden@rty.ca>
This commit is contained in:
Pavel Labath 2009-06-06 12:18:46 -06:00 committed by Brenden Matthews
parent 3170b5191a
commit aa68da1ce6

View File

@ -2989,12 +2989,12 @@ static char *handle_template(const char *tmpl, const char *args)
args_dup = strdup(args);
p = args_dup;
while (*p) {
while (*p && (*p == ' ' && p > args_dup && *(p - 1) != '\\'))
while (*p && (*p == ' ' && (p == args_dup || *(p - 1) != '\\')))
p++;
if (p > args_dup && *(p - 1) == '\\')
p--;
p_old = p;
while (*p && (*p != ' ' || p == args_dup || *(p - 1) == '\\'))
while (*p && (*p != ' ' || (p > args_dup && *(p - 1) == '\\')))
p++;
if (*p) {
(*p) = '\0';