mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 04:17:33 +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);
|
args_dup = strdup(args);
|
||||||
p = args_dup;
|
p = args_dup;
|
||||||
while (*p) {
|
while (*p) {
|
||||||
while (*p && (*p == ' ' && p > args_dup && *(p - 1) != '\\'))
|
while (*p && (*p == ' ' && (p == args_dup || *(p - 1) != '\\')))
|
||||||
p++;
|
p++;
|
||||||
if (p > args_dup && *(p - 1) == '\\')
|
if (p > args_dup && *(p - 1) == '\\')
|
||||||
p--;
|
p--;
|
||||||
p_old = p;
|
p_old = p;
|
||||||
while (*p && (*p != ' ' || p == args_dup || *(p - 1) == '\\'))
|
while (*p && (*p != ' ' || (p > args_dup && *(p - 1) == '\\')))
|
||||||
p++;
|
p++;
|
||||||
if (*p) {
|
if (*p) {
|
||||||
(*p) = '\0';
|
(*p) = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user