adventure(6): Fix saving games on x86_64.
authorSascha Wildner <saw@online.de>
Thu, 3 Dec 2009 22:56:44 +0000 (23:56 +0100)
committerSascha Wildner <saw@online.de>
Thu, 3 Dec 2009 22:56:44 +0000 (23:56 +0100)
Submitted-by: tuxillo
games/adventure/crc.c

index 1eab8c4..bca7735 100644 (file)
@@ -130,7 +130,7 @@ crc(const char *ptr, int nr)
                                if (step >= sizeof(crctab)/sizeof(crctab[0]))
                                        step = 0;
                        }
-                       crcval = (crcval << 8) ^ crctab[i];
+                       crcval = ((crcval << 8) ^ crctab[i]) & 0xffffffff;
                }
-       return crcval & 0xffffffff;               /* Mask to 32 bits. */
+       return crcval;
 }