From 93ee5b9446cce9cb7cc3399ff0e865a1e452ec47 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 13 Jun 2023 06:46:44 +0300 Subject: [PATCH] public: crclib: simplify CRC32_ProcessByte --- public/crclib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/crclib.c b/public/crclib.c index ec57576b..14cf65c2 100644 --- a/public/crclib.c +++ b/public/crclib.c @@ -104,9 +104,7 @@ void GAME_EXPORT CRC32_ProcessByte( dword *pulCRC, byte ch ) { dword ulCrc = *pulCRC; - ulCrc ^= ch; - ulCrc = crc32table[(byte)ulCrc] ^ (ulCrc >> 8); - *pulCRC = ulCrc; + *pulCRC = crc32table[((byte)ulCrc ^ ch)] ^ (ulCrc >> 8); } void GAME_EXPORT CRC32_ProcessBuffer( dword *pulCRC, const void *pBuffer, int nBuffer )