diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index ceb449a9bb..37a4173864 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -499,7 +499,7 @@ CString GetCwd() * http://www.theorem.com/java/CRC32.java, * http://www.faqs.org/rfcs/rfc1952.html */ -void CRC32( unsigned int &iCRC, const char *pBuffer, size_t iSize ) +void CRC32( unsigned int &iCRC, const void *pVoidBuffer, size_t iSize ) { static unsigned tab[256]; static bool initted = false; @@ -522,6 +522,7 @@ void CRC32( unsigned int &iCRC, const char *pBuffer, size_t iSize ) } unsigned crc = 0; + const char *pBuffer = (const char *) pVoidBuffer; for( unsigned i = 0; i < iSize; ++i ) iCRC = (iCRC >> 8) ^ tab[(iCRC ^ pBuffer[i]) & 0xFF]; } diff --git a/stepmania/src/RageUtil.h b/stepmania/src/RageUtil.h index 3679f10109..1165105994 100644 --- a/stepmania/src/RageUtil.h +++ b/stepmania/src/RageUtil.h @@ -237,7 +237,7 @@ CString join( const CString &Delimitor, CStringArray::const_iterator begin, CStr CString GetCwd(); -void CRC32( unsigned int &iCRC, const char *pBuffer, size_t iSize ); +void CRC32( unsigned int &iCRC, const void *pBuffer, size_t iSize ); unsigned int GetHashForString( const CString &s ); unsigned int GetHashForFile( const CString &sPath ); unsigned int GetHashForDirectory( const CString &sDir ); // a hash value that remains the same as long as nothing in the directory has changed