From a3224dac7a3df9e2dba3cfa1921a428c650b56af Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 23 Oct 2024 19:49:24 +0800 Subject: [PATCH] fixes incorrect casting to UncheckedArray --- 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))