diff options
Diffstat (limited to 'dep/g3dlite/source/Crypto.cpp')
-rw-r--r-- | dep/g3dlite/source/Crypto.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dep/g3dlite/source/Crypto.cpp b/dep/g3dlite/source/Crypto.cpp index c69b23375ce..8d54fbeeac7 100644 --- a/dep/g3dlite/source/Crypto.cpp +++ b/dep/g3dlite/source/Crypto.cpp @@ -11,7 +11,7 @@ #include "G3D/platform.h" #include "G3D/Crypto.h" #include "G3D/g3dmath.h" -#include <zlib.h> +#include "zlib.h" namespace G3D { @@ -64,7 +64,8 @@ int Crypto::numSmallPrimes() { } uint32 Crypto::crc32(const void* byte, size_t numBytes) { - return ::crc32(::crc32(0, Z_NULL, 0), static_cast<const Bytef *>(byte), numBytes); + alwaysAssertM(numBytes < 0xFFFFFFFF, "Not implemented for arrays larger than 2^32 bytes"); + return ::crc32(::crc32(0, Z_NULL, 0), static_cast<const Bytef *>(byte), (int)numBytes); } } // G3D |