diff options
author | Lex Spoon <lex@lexspoon.org> | 2007-07-13 19:24:31 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2007-07-13 19:24:31 +0000 |
commit | f6a91763080edaf39e94983f1da7156139b6b491 (patch) | |
tree | cd01fa1dfd71e0cf58c0e121f520f20a7611ef93 /src/compiler/scala/tools/nsc/util/CharArrayReader.scala | |
parent | 72105be047b775ad0c3080cb31dd43e392b6ce2b (diff) | |
download | scala-f6a91763080edaf39e94983f1da7156139b6b491.tar.gz scala-f6a91763080edaf39e94983f1da7156139b6b491.tar.bz2 scala-f6a91763080edaf39e94983f1da7156139b6b491.zip |
make extra sure that ch==SU whenever the
end of the buffer is reached
Diffstat (limited to 'src/compiler/scala/tools/nsc/util/CharArrayReader.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/util/CharArrayReader.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/util/CharArrayReader.scala b/src/compiler/scala/tools/nsc/util/CharArrayReader.scala index 7cd72be464..ba67c6e3ea 100644 --- a/src/compiler/scala/tools/nsc/util/CharArrayReader.scala +++ b/src/compiler/scala/tools/nsc/util/CharArrayReader.scala @@ -53,8 +53,11 @@ class CharArrayReader(buf: Array[Char], start: Int, /* startline: Int, startcol: def next: Char = { //cline = nextline //ccol = nextcol - if(!hasNext) - return SU // there is an endless stream of SU's at the end + if(!hasNext) { + // there is an endless stream of SU's at the end + ch = SU + return SU + } oldBp = bp oldCh = ch ch = buf(bp) |