aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/SceneQuery/src
diff options
context:
space:
mode:
Diffstat (limited to 'PhysX_3.4/Source/SceneQuery/src')
-rw-r--r--PhysX_3.4/Source/SceneQuery/src/SqExtendedBucketPruner.cpp2
-rw-r--r--PhysX_3.4/Source/SceneQuery/src/SqPruningStructure.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/PhysX_3.4/Source/SceneQuery/src/SqExtendedBucketPruner.cpp b/PhysX_3.4/Source/SceneQuery/src/SqExtendedBucketPruner.cpp
index a218f655..a9a7b2ef 100644
--- a/PhysX_3.4/Source/SceneQuery/src/SqExtendedBucketPruner.cpp
+++ b/PhysX_3.4/Source/SceneQuery/src/SqExtendedBucketPruner.cpp
@@ -51,7 +51,7 @@ ExtendedBucketPruner::ExtendedBucketPruner(const PruningPool* pool)
// preallocated size for bounds, trees
mCurrentTreeCapacity = 32;
- mBounds = reinterpret_cast<PxBounds3*>(PX_ALLOC(sizeof(PxBounds3)*mCurrentTreeCapacity, "Bounds"));
+ mBounds = reinterpret_cast<PxBounds3*>(PX_ALLOC(sizeof(PxBounds3)*(mCurrentTreeCapacity + 1), "Bounds"));
mMergedTrees = reinterpret_cast<MergedTree*>(PX_ALLOC(sizeof(MergedTree)*mCurrentTreeCapacity, "AABB trees"));
mExtendedBucketPrunerMap.reserve(mCurrentTreeCapacity);
diff --git a/PhysX_3.4/Source/SceneQuery/src/SqPruningStructure.cpp b/PhysX_3.4/Source/SceneQuery/src/SqPruningStructure.cpp
index 38e5b108..0a2cee50 100644
--- a/PhysX_3.4/Source/SceneQuery/src/SqPruningStructure.cpp
+++ b/PhysX_3.4/Source/SceneQuery/src/SqPruningStructure.cpp
@@ -222,7 +222,7 @@ bool PruningStructure::build(PxRigidActor*const* actors, PxU32 nbActors)
{
if(numShapes[i])
{
- bounds[i] = reinterpret_cast<PxBounds3*>(PX_ALLOC(sizeof(PxBounds3)*numShapes[i], "Pruner bounds"));
+ bounds[i] = reinterpret_cast<PxBounds3*>(PX_ALLOC(sizeof(PxBounds3)*(numShapes[i] + 1), "Pruner bounds"));
}
}