From 69c6ff7aa06045a3fdaf6a134041e9206cb95a9e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 30 Apr 2014 10:15:18 +0900 Subject: fix condition for the rest of input the input must rest the length of a string to be peeked at least. fixes parse error at embedded documents by string eval, and `-e` command line options. --- src/parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/parse.y b/src/parse.y index aab1aaa40..7f1139a07 100644 --- a/src/parse.y +++ b/src/parse.y @@ -3454,7 +3454,7 @@ peeks(parser_state *p, const char *s) } else #endif - if (p->s && p->s + len >= p->send) { + if (p->s && p->s + len <= p->send) { if (memcmp(p->s, s, len) == 0) return TRUE; } return FALSE; -- cgit v1.2.3