diff options
author | Miles Sabin <miles@milessabin.com> | 2008-10-09 12:16:19 +0000 |
---|---|---|
committer | Miles Sabin <miles@milessabin.com> | 2008-10-09 12:16:19 +0000 |
commit | 8f1a65cb9735dff2c51e4f0f3b0e3a075ff9ebeb (patch) | |
tree | e088dcb42494e2461c59907bf9fe68cc00c05982 /src | |
parent | bd46c931f0fba3a9bee8816a7b2fb77ed33bc361 (diff) | |
download | scala-8f1a65cb9735dff2c51e4f0f3b0e3a075ff9ebeb.tar.gz scala-8f1a65cb9735dff2c51e4f0f3b0e3a075ff9ebeb.tar.bz2 scala-8f1a65cb9735dff2c51e4f0f3b0e3a075ff9ebeb.zip |
Merged in fix from branch.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/util/SourceFile.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/util/SourceFile.scala b/src/compiler/scala/tools/nsc/util/SourceFile.scala index 32e3d5768c..4bda1e340b 100644 --- a/src/compiler/scala/tools/nsc/util/SourceFile.scala +++ b/src/compiler/scala/tools/nsc/util/SourceFile.scala @@ -70,7 +70,7 @@ class BatchSourceFile(val file : AbstractFile, _content : Array[Char]) extends S compiler.syntaxAnalyzer.isIdentifierPart(content(i)))) i = i + 1 assert(i > offset) - if (i <= content.length) + if (i <= content.length && offset >= 0) Some(new String(content, offset, i - offset)) else None case _ => super.identifier(pos, compiler) |