fix standard crc32
This commit is contained in:
@@ -521,10 +521,14 @@ void CRC32( unsigned int &iCRC, const void *pVoidBuffer, size_t iSize )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iCRC ^= 0xFFFFFFFF;
|
||||||
|
|
||||||
unsigned crc = 0;
|
unsigned crc = 0;
|
||||||
const char *pBuffer = (const char *) pVoidBuffer;
|
const char *pBuffer = (const char *) pVoidBuffer;
|
||||||
for( unsigned i = 0; i < iSize; ++i )
|
for( unsigned i = 0; i < iSize; ++i )
|
||||||
iCRC = (iCRC >> 8) ^ tab[(iCRC ^ pBuffer[i]) & 0xFF];
|
iCRC = (iCRC >> 8) ^ tab[(iCRC ^ pBuffer[i]) & 0xFF];
|
||||||
|
|
||||||
|
iCRC ^= 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int GetHashForString ( const CString &s )
|
unsigned int GetHashForString ( const CString &s )
|
||||||
|
|||||||
Reference in New Issue
Block a user