Commit b035cab5 by josé bollo

fix a bug

the bug was occuring when closing tags before opening
it like in

  }} {{

Signed-off-by: José Bollo <jobol@nonadev.net>
parent 6fc2324f
Showing with 2 additions and 2 deletions
......@@ -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 sign in to comment