Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2010-09-03 09:18:36 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2010-09-03 09:18:36 +0400
commitd5ddc9eadb5006c73470011c01290910690431b8 (patch)
treeafd08ca868524b77ce35ca7d323bd78cd5dce513 /extern/bullet2/src/BulletCollision
parenta8269c89469c6d79e882d247097270f3e281d253 (diff)
Fix [#23569] Convex hull bounds crash Blender
Reported by dobz116 This appears to happen only on 64bit Windows. An issue for this part of code was reported at http://code.google.com/p/bullet/issues/detail?id=204 and fixed at http://code.google.com/p/bullet/source/detail?r=1650 . The code change also fixes the crash we experience: merged changes.
Diffstat (limited to 'extern/bullet2/src/BulletCollision')
-rw-r--r--extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp
index 2b067367767..7b45fad12df 100644
--- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp
+++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp
@@ -24,12 +24,13 @@ btConvexHullShape ::btConvexHullShape (const btScalar* points,int numPoints,int
m_shapeType = CONVEX_HULL_SHAPE_PROXYTYPE;
m_unscaledPoints.resize(numPoints);
- unsigned char* pointsBaseAddress = (unsigned char*)points;
+ unsigned char* pointsAddress = (unsigned char*)points;
for (int i=0;i<numPoints;i++)
{
- btVector3* point = (btVector3*)(pointsBaseAddress + i*stride);
- m_unscaledPoints[i] = point[0];
+ btScalar* point = (btScalar*)pointsAddress;
+ m_unscaledPoints[i] = btVector3(point[0], point[1], point[2]);
+ pointsAddress += stride;
}
recalcLocalAabb();