Skip to content

Commit

Permalink
Merge pull request #6 from beef331/patch-1
Browse files Browse the repository at this point in the history
Properly make slice using `high` not `len`
  • Loading branch information
termermc committed Sep 26, 2023
2 parents 5d50afb + 613d073 commit f6ae2b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stack_strings.nim
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ template toOpenArray*(this: StackString): untyped =
## Converts the [StackString] to `openArray[char]`.
## Thanks to ElegantBeef for help on this template.

this.data.toOpenArray(0, this.len)
this.data.toOpenArray(0, this.high)

template toCstring*(this: StackString): cstring =
## Converts the [StackString] to `cstring`.
Expand Down
2 changes: 1 addition & 1 deletion stack_strings.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "1.1.1"
version = "1.1.2"
author = "termer"
description = "Library for guaranteed zero heap allocation strings"
license = "MIT"
Expand Down

0 comments on commit f6ae2b6

Please sign in to comment.