Bug report: Typos in Box2DFlash 2.1a

From b2RevoluteJoint.as:
Code:
   /**
   * Is the joint motor enabled?
   */
   public function IsMotorEnabled() :Boolean {
      m_bodyA.SetAwake(true);
      m_bodyB.SetAwake(true);
      return m_enableMotor;
   }

   /**
   * Enable/disable the joint motor.
   */
   public function EnableMotor(flag:Boolean) :void{
      m_enableMotor = flag;
   }

The 'SetAwake()' calls should be in EnableMotor(), rather than IsMotorEnabled().


Here's another one from b2Fixture.as:
Code:
   /**
    * Set the contact filtering data. This will not update contacts until the next time
    * step when either parent body is active and awake.
    */
   public function SetFilterData(filter:b2FilterData):void
   {
      m_filter = filter.Copy();
      
      if (m_body)
         return;
      [...does stuff with m_body]

The conditional should be 'if (m_body == null)', otherwise it fall through and accesses a null reference.

Original thread: https://box2d.org/forum/viewtopic.php?t=5738