summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-12-08 02:57:59 +0000
committerPaul Phillips <paulp@improving.org>2009-12-08 02:57:59 +0000
commita4011632f75e29875d656466d5bc20b89fb476be (patch)
tree8465bb55cb1cccb36d7861ced1d1af497e37d61a /src
parente1c9a81e5dba7ceafaed24760e80ebc5bf094f25 (diff)
downloadscala-a4011632f75e29875d656466d5bc20b89fb476be.tar.gz
scala-a4011632f75e29875d656466d5bc20b89fb476be.tar.bz2
scala-a4011632f75e29875d656466d5bc20b89fb476be.zip
Tweaking logic errors in broken docs build.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/compiler/scala/tools/nsc/ast/DocComments.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/DocComments.scala b/src/compiler/scala/tools/nsc/ast/DocComments.scala
index 14ff83bcfc..57edea3ca1 100755
--- a/src/compiler/scala/tools/nsc/ast/DocComments.scala
+++ b/src/compiler/scala/tools/nsc/ast/DocComments.scala
@@ -88,7 +88,7 @@ trait DocComments { self: SymbolTable =>
var idx = in
do {
idx += 1
- } while (idx < str.length && (str charAt idx) == ' ' || (str charAt idx) == '\t')
+ } while (idx < str.length && ((str charAt idx) == ' ' || (str charAt idx) == '\t'))
idx
}
@@ -239,7 +239,8 @@ trait DocComments { self: SymbolTable =>
if ((str charAt idx) == '\n') {
eolIdx = idx
idx = skipLineLead(str, idx, end)
- if ((str charAt idx) == '@' &&
+ if (idx < end &&
+ (str charAt idx) == '@' &&
(str.startsWith(definePrefix, idx) || str.startsWith(usecasePrefix, idx))) {
var segment = str.substring(segstart, eolIdx)
if (segstart == 0) segment += "*/"