X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmustach.c;h=9868cffb41d851715a3fdbfa4cf3e247d2548a8c;hb=3a2efc3143d89d036794f2d8274794482cb2c961;hp=5bf9f561b358c121a5ed39d7ccbdf94583f0412c;hpb=b0ac8a02e6c0c78b275f85697bd1da5be3b57876;p=src%2Fapp-framework-main.git diff --git a/src/mustach.c b/src/mustach.c index 5bf9f56..9868cff 100644 --- a/src/mustach.c +++ b/src/mustach.c @@ -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) { @@ -99,6 +99,7 @@ static int process(const char *template, struct mustach_itf *itf, void *closure, template++; } c = '&'; + /*@fallthrough@*/ case '^': case '#': case '/':