mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-10-21 08:10:56 +00:00
Merge pull request #2855 from asmaloney/fix-pointer-check
Fix parameter check in bFile::safeSwapPtr
This commit is contained in:
@@ -851,12 +851,12 @@ void bFile::swapData(char *data, short type, int arraySize, bool ignoreEndianFla
|
||||
|
||||
void bFile::safeSwapPtr(char *dst, const char *src)
|
||||
{
|
||||
if (!src || !dst)
|
||||
return;
|
||||
|
||||
int ptrFile = mFileDNA->getPointerSize();
|
||||
int ptrMem = mMemoryDNA->getPointerSize();
|
||||
|
||||
if (!src && !dst)
|
||||
return;
|
||||
|
||||
if (ptrFile == ptrMem)
|
||||
{
|
||||
memcpy(dst, src, ptrMem);
|
||||
|
||||
Reference in New Issue
Block a user