projects
/
haskell-directory.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35c32c8
)
[project @ 2003-01-13 11:32:00 by simonmar]
author
simonmar
<unknown>
Mon, 13 Jan 2003 11:32:00 +0000
(11:32 +0000)
committer
simonmar
<unknown>
Mon, 13 Jan 2003 11:32:00 +0000
(11:32 +0000)
Fix off-by-one in splitWithPS.
Noticed-by: Tomasz Zielonka <t.zielonka@students.mimuw.edu.pl>
MERGE TO STABLE
Data/PackedString.hs
patch
|
blob
|
history
diff --git
a/Data/PackedString.hs
b/Data/PackedString.hs
index
da0206a
..
f82b756
100644
(file)
--- a/
Data/PackedString.hs
+++ b/
Data/PackedString.hs
@@
-248,7
+248,7
@@
splitWithPS pred (PS ps) =
: splitify (break_pt + 1)
first_pos_that_satisfies pred ps len n =
- case [ m | m <- [n..len], pred (ps ! m) ] of
+ case [ m | m <- [n..len-1], pred (ps ! m) ] of
[] -> len
(m:_) -> m