From ab6fa4c74a4b1353d2b0d36b0d9b7eaa119b4c85 Mon Sep 17 00:00:00 2001 From: krypt-n Date: Tue, 24 Feb 2015 14:05:38 +0100 Subject: [PATCH] Ignore % if not followed by { --- bar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bar.c b/bar.c index 365a7d4..d7a510e 100644 --- a/bar.c +++ b/bar.c @@ -602,7 +602,8 @@ parse (char *text) if (*p == '\0' || *p == '\n') break; - if (*p == '%' && p++ && *p == '{' && (block_end = strchr(p++, '}'))) { + if (*p == '%' && *(p+1) == '{' && (block_end = strchr(p+2, '}'))) { + p += 2; while (p < block_end) { while (isspace(*p)) p++;