From d7420203456f4369a490310170a2597cb4c32fe6 Mon Sep 17 00:00:00 2001 From: Eugene Vigdorchik Date: Thu, 23 Sep 2010 12:03:08 +0000 Subject: AIOOBE in scanner when typing in the end of file. --- src/compiler/scala/tools/nsc/ast/parser/Scanners.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala index f798d3979b..66a3dc356e 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala @@ -242,7 +242,8 @@ trait Scanners { // println("blank line found at "+lastOffset+":"+(lastOffset to idx).map(buf(_)).toList) return true } - } while (idx < end && ch <= ' ') + if (idx == end) return false + } while (ch <= ' ') } idx += 1; ch = buf(idx) } -- cgit v1.2.3