Skip to content

Commit d9b365b

Browse files
authored
[Defaulttype] RigidDeriv: fix out-of-bounds access in ctor with Vec6 (#5735)
fix out-of-bounds access
1 parent 0ab3598 commit d9b365b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sofa/framework/DefaultType/src/sofa/defaulttype/RigidDeriv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class RigidDeriv<3, real>
7979

8080
template<typename real2>
8181
constexpr RigidDeriv(const type::Vec<6, real2>& v)
82-
: vCenter(type::Vec<3, real2>(v[0], v[1], v[2])), vOrientation(type::Vec<3, real2>(v[4], v[5], v[6]))
82+
: vCenter(type::Vec<3, real2>(v[0], v[1], v[2])), vOrientation(type::Vec<3, real2>(v[3], v[4], v[5]))
8383
{}
8484

8585
template<typename real2>

0 commit comments

Comments
 (0)