diff options
| author | Nobuyoshi Nakada <[email protected]> | 2014-04-30 10:15:18 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <[email protected]> | 2014-05-03 08:42:31 +0900 |
| commit | 69c6ff7aa06045a3fdaf6a134041e9206cb95a9e (patch) | |
| tree | eedf5515cec4ca3ee9d78db4d33272d8699ed112 /src/parse.y | |
| parent | 72fe54c40316acff40f7748e447db9e7bc73849d (diff) | |
| download | mruby-69c6ff7aa06045a3fdaf6a134041e9206cb95a9e.tar.gz mruby-69c6ff7aa06045a3fdaf6a134041e9206cb95a9e.zip | |
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.
Diffstat (limited to 'src/parse.y')
| -rw-r--r-- | src/parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
