mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 05:40:05 +00:00
390eeb111b
When reading response from the Bullet server after a "load URDF" command, the client code allocated and zeroed buffers for the data chunks with a "+1" to account for the terminating zero. This was when the buffer pointer was interpreted as a `char *`, so it meant "+ 1 byte". When reading those buffers, however, the associated pointer was a `void *`, so reading `sizeof(void*)` (8 on my machine) bytes at a time. Therefore it was reading up to 7 bytes past the allocated (and zeroed) memory. The change fixes that by changing the "+ 1" to "+ sizeof(void*)". At one place it also extends the zeroing to the final buffer position (missing "+ 1" in the original). |
||
---|---|---|
.. | ||
autogenerated | ||
bChunk.cpp | ||
bChunk.h | ||
bCommon.h | ||
bDefines.h | ||
bDNA.cpp | ||
bDNA.h | ||
bFile.cpp | ||
bFile.h | ||
btBulletFile.cpp | ||
btBulletFile.h | ||
CMakeLists.txt | ||
premake4.lua |