From b38bb5aa565c2ee2917e1586f338e70b2d17c6b0 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Tue, 31 Oct 2017 13:59:41 +0200 Subject: [PATCH] Fixed backward compatibility with older nim --- nimPNG.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nimPNG.nim b/nimPNG.nim index 166474f..a51c856 100644 --- a/nimPNG.nim +++ b/nimPNG.nim @@ -226,8 +226,8 @@ proc crc32(crc: uint32, buf: string): uint32 = var crcu32 = not crc for b in buf: - crcu32 = (crcu32 shr 4) xor kcrc32[(crcu32 and 0xF) xor (uint32(b) and 0xF'u32)] - crcu32 = (crcu32 shr 4) xor kcrc32[(crcu32 and 0xF) xor (uint32(b) shr 4'u32)] + crcu32 = (crcu32 shr 4) xor kcrc32[int((crcu32 and 0xF) xor (uint32(b) and 0xF'u32))] + crcu32 = (crcu32 shr 4) xor kcrc32[int((crcu32 and 0xF) xor (uint32(b) shr 4'u32))] result = not crcu32