Fix an off-by-one error in the implementation of 'split'.

This was causing incorrect computation in examples/MiniLock/prim/Blake2s.cry.
This commit is contained in:
Robert Dockins 2016-07-25 14:43:17 -07:00
parent 2e15d4f443
commit 1c5f786811

View File

@ -665,7 +665,7 @@ extractWordVal len start (WordVal w) =
WordVal $ extractWord len start w
extractWordVal len start (BitsVal bs) =
BitsVal $ Seq.take (fromInteger len) $
Seq.drop (Seq.length bs - fromInteger start - fromInteger len - 1) bs
Seq.drop (Seq.length bs - fromInteger start - fromInteger len) bs
-- | Split implementation.