diff options
author | Rafał Mikrut <mikrutrafal54@gmail.com> | 2020-04-01 19:29:35 +0200 |
---|---|---|
committer | Rafał Mikrut <mikrutrafal54@gmail.com> | 2020-04-01 19:29:35 +0200 |
commit | 359bebd8c08a626e64ade1ac45c3c925352bd8a4 (patch) | |
tree | 83769dbf9cdb5ca7e6dee2e04b95dfc2c1f587c4 /modules/bullet/generic_6dof_joint_bullet.cpp | |
parent | 0168709978154a89f137b44f33647e5d28a46250 (diff) |
Fix out of bound array access caused by unassigned variable
Diffstat (limited to 'modules/bullet/generic_6dof_joint_bullet.cpp')
-rw-r--r-- | modules/bullet/generic_6dof_joint_bullet.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/bullet/generic_6dof_joint_bullet.cpp b/modules/bullet/generic_6dof_joint_bullet.cpp index a6a01ebaa8..638944df76 100644 --- a/modules/bullet/generic_6dof_joint_bullet.cpp +++ b/modules/bullet/generic_6dof_joint_bullet.cpp @@ -43,6 +43,12 @@ Generic6DOFJointBullet::Generic6DOFJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameInA, const Transform &frameInB) : JointBullet() { + for (int i = 0; i < 3; i++) { + for (int j = 0; j < PhysicsServer3D::G6DOF_JOINT_FLAG_MAX; j++) { + flags[i][j] = false; + } + } + Transform scaled_AFrame(frameInA.scaled(rbA->get_body_scale())); scaled_AFrame.basis.rotref_posscale_decomposition(scaled_AFrame.basis); |