From f5f6002cdc65a5896f08e195511eeeb96fc87661 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 5 Mar 2018 05:52:59 -0600 Subject: [PATCH] Removed another loop for known array size in CRC32 method --- DS4Windows/DS4Library/Crc32.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DS4Windows/DS4Library/Crc32.cs b/DS4Windows/DS4Library/Crc32.cs index 55c5511..4e9bc1a 100644 --- a/DS4Windows/DS4Library/Crc32.cs +++ b/DS4Windows/DS4Library/Crc32.cs @@ -361,10 +361,11 @@ namespace DS4Windows */ - while (--bufsize >= 0) - { + //while (--bufsize >= 0) + //{ crc = (crc >> 8) ^ defaultTable[(crc & 0xFF) ^ buffer[i++]];// i++; - } + crc = (crc >> 8) ^ defaultTable[(crc & 0xFF) ^ buffer[i++]];// i++; + //} return crc; }