Skip to content

Commit

Permalink
fix: createLeft
Browse files Browse the repository at this point in the history
Reported by Altai-Man in #4
  • Loading branch information
dzhus committed Mar 26, 2017
1 parent 62f8b59 commit 37ef591
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
#### Added

- `ShortByteString` support

#### Fixed

- a bug in `createLeft` which failed to actually pad/truncate strings
(reported by Altai-man https://github.com/dzhus/sext/issues/4)
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sext
version: "0.1.2"
version: "0.1.2.1"
synopsis: Lists, Texts, ByteStrings, and Vectors with type-encoded length

description: Sext (/s/tatic t/ext/) provides type-level safety for
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Sext.hs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ createLeft :: forall a i.
Elem a -> a -> Sext i a
createLeft e s =
C.unsafeCreate $
C.take (C.length s) $
C.take t $
C.append s $
C.replicate (t - C.length s) e
where
Expand Down

0 comments on commit 37ef591

Please sign in to comment.