aboutsummaryrefslogtreecommitdiff
path: root/src/interp/br-search.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/br-search.boot')
-rw-r--r--src/interp/br-search.boot10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot
index c7f24eed..35a803d6 100644
--- a/src/interp/br-search.boot
+++ b/src/interp/br-search.boot
@@ -699,12 +699,12 @@ dbString2Words l ==
$dbDelimiters := [char " " , char "(", char ")"]
dbWordFrom(l,i) ==
- maxIndex := MAXINDEX l
- while maxIndex >= i and l.i = char " " repeat i := i + 1
- if maxIndex >= i and member(l.i, $dbDelimiters) then return [l.i, i + 1]
- k := or/[j for j in i..maxIndex | not member(l.j, $dbDelimiters)] or return nil
+ idxmax := MAXINDEX l
+ while idxmax >= i and l.i = char " " repeat i := i + 1
+ if idxmax >= i and member(l.i, $dbDelimiters) then return [l.i, i + 1]
+ k := or/[j for j in i..idxmax | not member(l.j, $dbDelimiters)] or return nil
buf := '""
- while k <= maxIndex and not member(c := l.k, $dbDelimiters) repeat
+ while k <= idxmax and not member(c := l.k, $dbDelimiters) repeat
ch :=
c = char '__ => l.(k := 1+k) --this may exceed bounds
c