aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2019-09-28 15:28:23 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2019-09-28 15:28:23 -0400
commitd8987084b7aa3c47642af30a87c0673a2df01fd0 (patch)
treefd8a8f45e144513cf52d8315f1acdc106ee17c04 /src
parentdea57a10e7d7850ea8263b5590c194cfc661c6ce (diff)
downloadlibctemplates-d8987084b7aa3c47642af30a87c0673a2df01fd0.tar.gz
libctemplates-d8987084b7aa3c47642af30a87c0673a2df01fd0.tar.bz2
libctemplates-d8987084b7aa3c47642af30a87c0673a2df01fd0.zip
Bugfix
Fixed a bug where rendering a template multiple times would fail.
Diffstat (limited to 'src')
-rw-r--r--src/ctemplates.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ctemplates.c b/src/ctemplates.c
index d507d33..9a3b890 100644
--- a/src/ctemplates.c
+++ b/src/ctemplates.c
@@ -1250,6 +1250,7 @@ TMPL_render(struct TMPL_templates* t, struct TMPL_varlist* varlist, size_t* size
free_tmpl_buf(t->out);
}
t->out = alloc_tmpl_buf();
+ t->cursor = t->roottag;
TMPL_render_helper(t,varlist);
char* ret = bstringify(t->out,size_p);
return ret;