From 44d8ac690c3ac11f482825373b4ed5acf6d673df Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Thu, 3 Dec 2009 23:56:44 +0100 Subject: [PATCH] adventure(6): Fix saving games on x86_64. Submitted-by: tuxillo --- games/adventure/crc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.41.0