From bdfd175e02f4dc2d0f72c0889f3144bf4361bf15 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 23 Jan 2021 12:30:59 -0500 Subject: [PATCH] Workaround for gc:arc SIGSEGV --- src/pixie/fileformats/png.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pixie/fileformats/png.nim b/src/pixie/fileformats/png.nim index 67c3b62..2db254f 100644 --- a/src/pixie/fileformats/png.nim +++ b/src/pixie/fileformats/png.nim @@ -437,9 +437,10 @@ proc encodePng*( raise newException(PixieError, "Invalid PNG number of channels") let data = cast[ptr UncheckedArray[uint8]](data) + const signature = [137.uint8, 80, 78, 71, 13, 10, 26, 10] # Add the PNG file signature - result.add([137.uint8, 80, 78, 71, 13, 10, 26, 10]) + result.add(signature) # Add IHDR result.addUint32(13.uint32.swap())