Skip to content

Commit

Permalink
Initialize vertexSource
Browse files Browse the repository at this point in the history
Default constructor of btVector3 does not initialize the object.
This fixes Memory Sanitizer reports.
  • Loading branch information
vitalybuka authored Jun 15, 2022
1 parent a1d9664 commit 6626ed1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/LinearMath/btConvexHull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6626ed1

Please sign in to comment.