summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-10 10:24:17 -0400
committerJune McEnroe <june@causal.agency>2020-04-10 10:24:17 -0400
commitcd4c89c5ba79fd107892f39b35b2720bedea5dbd (patch)
tree2ae6da4472213e37fa7a9eb2d1a8a905f78f7674
parentURL encode the fragment link (diff)
downloadbubger-cd4c89c5ba79fd107892f39b35b2720bedea5dbd.tar.gz
bubger-cd4c89c5ba79fd107892f39b35b2720bedea5dbd.zip
Do not multiply URL template length by 3
It doesn't get escaped.
Diffstat (limited to '')
-rw-r--r--template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/template.c b/template.c
index 426f1d0..435769c 100644
--- a/template.c
+++ b/template.c
@@ -99,7 +99,7 @@ int templateRender(
 }
 
 char *templateURL(const char *template, const struct Variable vars[]) {
-	size_t cap = 3 * strlen(template) + 1;
+	size_t cap = strlen(template) + 1;
 	for (const struct Variable *var = vars; var->name; ++var) {
 		cap += 3 * strlen(var->value);
 	}