From 1e844fd1d92cbda4ddefa2f48987aaabcde35257 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 13 Apr 2012 23:40:21 -0700 Subject: [PATCH] finished 64-bit compiler support --- crc32.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crc32.h b/crc32.h index f48eeb9..5323044 100644 --- a/crc32.h +++ b/crc32.h @@ -74,7 +74,8 @@ static void crc_allocate_tables_once() static void crc_fill_big_endian_table() { const ulong least_significant_bit = 1 << 31; - int c, i; + ulong c; + int i; crc_allocate_tables_once(); @@ -87,8 +88,8 @@ static void crc_fill_big_endian_table() } else { crc_be_table[c] <<= 1; } + crc_be_table[c] &= 0xFFFFFFFF; } - crc_be_table[c] &= 0xFFFFFFFF; } } @@ -96,7 +97,8 @@ static void crc_fill_little_endian_table() { const ulong least_significant_bit = 1; const ulong reflected_polynomial = crc_reflect(crc_polynomial); - int c, i; + ulong c; + int i; crc_allocate_tables_once(); /* printf("p: %08X\n", (int)reflected_polynomial); */