mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user