From 931b49d028c8c5760dd903a818f6204b28c04a4b Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 23 Oct 2024 21:32:35 +0800 Subject: [PATCH] fixes incorrect casting to UncheckedArray (#35) --- noise/lineImpl.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noise/lineImpl.nim b/noise/lineImpl.nim index 8c805fe..c3d2753 100644 --- a/noise/lineImpl.nim +++ b/noise/lineImpl.nim @@ -59,7 +59,7 @@ proc insertAtCursor(self: var Line, c: char32) = self.add(c) template toOpenArray(self: Line, start, stop: int): auto = - toOpenArray(cast[ptr array[0, char32]](self.data[0].unsafeAddr)[], start, stop - 1) + toOpenArray(cast[ptr UncheckedArray[char32]](self.data[0].unsafeAddr), start, stop - 1) proc calcColPos(self: Line, len: int): int = let width = mk_wcswidth(self.toOpenArray(0, len))