We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c26cc2b commit e477f2eCopy full SHA for e477f2e
src/core/s-crc.c
@@ -358,16 +358,20 @@ static REBCNT *CRC_Table;
358
static u32 *crc32_table = 0;
359
360
static void Make_CRC32_Table(void) {
361
- unsigned long c;
+ u32 c;
362
int n,k;
363
364
crc32_table = Make_Mem(256 * sizeof(u32));
365
366
for(n=0;n<256;n++) {
367
- c=(unsigned long)n;
+ c=(u32)n;
368
for(k=0;k<8;k++) {
369
if(c&1)
370
+#ifdef __LP64__
371
+ c=0xedb88320^(c>>1);
372
+#else
373
c=0xedb88320L^(c>>1);
374
+#endif
375
else
376
c=c>>1;
377
}
0 commit comments