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