Fixed backward compatibility with older nim

This commit is contained in:
Yuriy Glukhov 2017-10-31 13:59:41 +02:00
parent 67d74b067b
commit b38bb5aa56
1 changed files with 2 additions and 2 deletions

View File

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