From 451752b5436f661879b8a3e9d1770d1e1239a257 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Fri, 14 Aug 2015 11:36:18 -0300 Subject: source-parser: forbid BLOGC_VERSION variable in source files --- src/source-parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/source-parser.c') diff --git a/src/source-parser.c b/src/source-parser.c index 5c9d41d..f9a60ae 100644 --- a/src/source-parser.c +++ b/src/source-parser.c @@ -93,7 +93,9 @@ blogc_source_parse(const char *src, size_t src_len, blogc_error_t **err) ((current - start == 9) && (0 == strncmp("PAGE_NEXT", src + start, 9))) || ((current - start == 9) && - (0 == strncmp("PAGE_LAST", src + start, 9)))) + (0 == strncmp("PAGE_LAST", src + start, 9))) || + ((current - start == 13) && + (0 == strncmp("BLOGC_VERSION", src + start, 13)))) { *err = blogc_error_new_printf(BLOGC_ERROR_SOURCE_PARSER, "'%s' variable is forbidden in source files. It will " -- cgit v1.2.3-18-g5258