Closed graphitemaster closed 3 years ago
Spent awhile tracking this one down, but the component allocation code only copies sizeof(bool) * mNbComponents instead of sizeof(decimal) for mSleepTimes
sizeof(bool) * mNbComponents
sizeof(decimal)
mSleepTimes
https://github.com/DanielChappuis/reactphysics3d/blob/master/src/components/RigidBodyComponents.cpp#L101
memcpy(newSleepTimes, mSleepTimes, mNbComponents * sizeof(bool));
I have pushed a fix for this bug in the master branch.
Thanks a lot for taking the time to investigate this issue. This is very helpful.
Spent awhile tracking this one down, but the component allocation code only copies
sizeof(bool) * mNbComponents
instead ofsizeof(decimal)
formSleepTimes
https://github.com/DanielChappuis/reactphysics3d/blob/master/src/components/RigidBodyComponents.cpp#L101
memcpy(newSleepTimes, mSleepTimes, mNbComponents * sizeof(bool));