From: Sascha Wildner Date: Thu, 3 Dec 2009 22:56:44 +0000 (+0100) Subject: adventure(6): Fix saving games on x86_64. X-Git-Url: https://gitweb.dragonflybsd.org/~syl/dragonfly.git/commitdiff_plain/44d8ac690c3ac11f482825373b4ed5acf6d673df adventure(6): Fix saving games on x86_64. Submitted-by: tuxillo --- diff --git a/games/adventure/crc.c b/games/adventure/crc.c index 1eab8c4d52..bca77354eb 100644 --- a/games/adventure/crc.c +++ b/games/adventure/crc.c @@ -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; }