box2d icon indicating copy to clipboard operation
box2d copied to clipboard

Some joints does not check it's input in constructor, but check on future set

Open DBotThePony opened this issue 3 years ago • 0 comments

The b2RevoluteJoint::SetLimits method check it's input (and b2Assert them): https://github.com/erincatto/box2d/blob/9dc24a6fd4f32442c4bcf80791de47a0a7d25afb/src/dynamics/b2_revolute_joint.cpp#L425-L438

However, the constructor does not: https://github.com/erincatto/box2d/blob/9dc24a6fd4f32442c4bcf80791de47a0a7d25afb/src/dynamics/b2_revolute_joint.cpp#L50-L71

Same applies to wheel joint

This go sideways with prismatic joint which has similar properties and it check it's input for validity both in constructor and setter: https://github.com/erincatto/box2d/blob/9dc24a6fd4f32442c4bcf80791de47a0a7d25afb/src/dynamics/b2_prismatic_joint.cpp#L102 https://github.com/erincatto/box2d/blob/9dc24a6fd4f32442c4bcf80791de47a0a7d25afb/src/dynamics/b2_prismatic_joint.cpp#L532-L534

DBotThePony avatar Feb 16 '22 06:02 DBotThePony