Commit b035cab5 authored by josé bollo's avatar josé bollo

fix a bug

the bug was occuring when closing tags before opening it like in }} {{ Signed-off-by: josé bollo's avatarJosé Bollo <jobol@nonadev.net>
parent 6fc2324f
......@@ -76,11 +76,11 @@ static int process(const char *template, struct mustach_itf *itf, void *closure,
}
if (emit)
fwrite(template, (size_t)(beg - template), 1, file);
term = strstr(template, clstr);
beg += oplen;
term = strstr(beg, clstr);
if (term == NULL)
return MUSTACH_ERROR_UNEXPECTED_END;
template = term + cllen;
beg += oplen;
len = (size_t)(term - beg);
c = *beg;
switch(c) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment