1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-05 21:07:52 +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))
break;
if (strncmp(p, "$template", 9) && strncmp(p, "${template", 10)) {
if (strncmp(p, "$template", strlen("$template")) && strncmp(p, "${template", strlen("${template"))) {
*(o++) = *(p++);
continue;
}
@ -235,7 +235,8 @@ char *find_and_replace_templates(const char *inbuf)
}
} else {
templ = p + 1;
while (*p && !isspace(*p))
p += strlen("$template");
while (*p && isdigit(*p))
p++;
args = NULL;
}