Commit 69c6ff7a authored by Nobuyoshi Nakada's avatar Nobuyoshi Nakada

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.
parent 72fe54c4
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment