Workaround for gc:arc SIGSEGV

This commit is contained in:
Anuken 2021-01-23 12:30:59 -05:00 committed by GitHub
parent 2979b86aee
commit bdfd175e02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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())