diff options
author | Vitaly Buka <vitalybuka@gmail.com> | 2022-06-15 15:17:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-15 15:17:51 -0700 |
commit | 6626ed1a89e13e0e6f6b5a526e9f97fbb8e67b8f (patch) | |
tree | 0025e32554320e6ff83512c7c09ce15f2e0dbef2 | |
parent | a1d96646c8ca28b99b2581dcfc4d74cc3b4de018 (diff) | |
download | bullet3-6626ed1a89e13e0e6f6b5a526e9f97fbb8e67b8f.tar.gz |
Initialize vertexSource
Default constructor of btVector3 does not initialize the object.
This fixes Memory Sanitizer reports.
-rw-r--r-- | src/LinearMath/btConvexHull.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/LinearMath/btConvexHull.cpp b/src/LinearMath/btConvexHull.cpp index e7de2a369..94b68baf5 100644 --- a/src/LinearMath/btConvexHull.cpp +++ b/src/LinearMath/btConvexHull.cpp @@ -678,7 +678,9 @@ HullError HullLibrary::CreateConvexHull(const HullDesc &desc, // describes the if (vcount < 8) vcount = 8; btAlignedObjectArray<btVector3> vertexSource; - vertexSource.resize(static_cast<int>(vcount)); + btVector3 zero; + zero.setZero(); + vertexSource.resize(static_cast<int>(vcount), zero); btVector3 scale; |