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:
parent
3170b5191a
commit
aa68da1ce6
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user