diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-04-26 09:05:02 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-04-26 09:05:02 +0900 |
| commit | 5aa1c95710f76ce4cb35a27ccb402f9394edd524 (patch) | |
| tree | d1bd8d981626940e3eb17cbbe11b25c566fc95c0 /src | |
| parent | 0486c48b1aec2509076b6c2cc03ccc826d802c7d (diff) | |
| download | mruby-5aa1c95710f76ce4cb35a27ccb402f9394edd524.tar.gz mruby-5aa1c95710f76ce4cb35a27ccb402f9394edd524.zip | |
parse.y: skip() should not ignore end-of-file; fix #55
Diffstat (limited to 'src')
| -rw-r--r-- | src/parse.y | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y index f264a7f36..be18b1d35 100644 --- a/src/parse.y +++ b/src/parse.y @@ -3038,8 +3038,11 @@ skip(parser_state *p, char term) { int c; - while ((c = nextc(p)) != term) - ; + for (;;) { + c = nextc(p); + if (c < 0) break; + if (c == term) break; + } } static int |
