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.
This commit is contained in:
Nobuyoshi Nakada
2014-04-30 10:15:18 +09:00
parent 72fe54c403
commit 69c6ff7aa0
+1 -1
View File
@@ -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;