diff options
author | June McEnroe <june@causal.agency> | 2020-04-10 10:24:17 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-04-10 10:24:17 -0400 |
commit | cd4c89c5ba79fd107892f39b35b2720bedea5dbd (patch) | |
tree | 2ae6da4472213e37fa7a9eb2d1a8a905f78f7674 | |
parent | URL encode the fragment link (diff) | |
download | bubger-cd4c89c5ba79fd107892f39b35b2720bedea5dbd.tar.gz bubger-cd4c89c5ba79fd107892f39b35b2720bedea5dbd.zip |
Do not multiply URL template length by 3
It doesn't get escaped.
-rw-r--r-- | template.c | 2 |
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); } |