mirror of https://github.com/status-im/nimPNG.git
Fixed backward compatibility with older nim
This commit is contained in:
parent
67d74b067b
commit
b38bb5aa56
|
@ -226,8 +226,8 @@ proc crc32(crc: uint32, buf: string): uint32 =
|
||||||
|
|
||||||
var crcu32 = not crc
|
var crcu32 = not crc
|
||||||
for b in buf:
|
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[int((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) shr 4'u32))]
|
||||||
|
|
||||||
result = not crcu32
|
result = not crcu32
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue