1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-14 18:06:32 +00:00

Fix: Templates only work when they end with a space or a }

This commit is contained in:
Nikolas Garofil 2009-11-23 12:58:20 +01:00
parent d9f93d3c1e
commit b2987b9354

View File

@ -203,7 +203,7 @@ char *find_and_replace_templates(const char *inbuf)
if (!(*p)) if (!(*p))
break; break;
if (strncmp(p, "$template", 9) && strncmp(p, "${template", 10)) { if (strncmp(p, "$template", strlen("$template")) && strncmp(p, "${template", strlen("${template"))) {
*(o++) = *(p++); *(o++) = *(p++);
continue; continue;
} }
@ -235,7 +235,8 @@ char *find_and_replace_templates(const char *inbuf)
} }
} else { } else {
templ = p + 1; templ = p + 1;
while (*p && !isspace(*p)) p += strlen("$template");
while (*p && isdigit(*p))
p++; p++;
args = NULL; args = NULL;
} }