Center of Mass of Poly's incorrect - Bug

I think I've found a bug in v1.4.3 that calculating the center of mass of polygons does not take polyDef.localRotation into account.
I've only tested on the Flash port, but a cursory glance suggests that the problem is in the original C++.
Put the following in the TestBridge function of the Flash testbed to replicate:
Code:
public function TestBridge(){
   
   var pd:b2PolyDef = new b2PolyDef();
   pd.vertexCount=5;
   pd.vertices[0].Set(100,0);
   pd.vertices[1].Set(0,100);
   pd.vertices[2].Set(-30,100);
   pd.vertices[3].Set(-30,-30);
   pd.vertices[4].Set(100,-30);
   pd.localRotation=-Math.PI/2;
   pd.density=0.4;
   
   var bd:b2BodyDef = new b2BodyDef();
   bd.rotation=Math.PI/2;
   bd.position.Set(100, 200);
   bd.AddShape(ad);
   m_world.CreateBody(bd);   
}

This code causes the polygon to stand up unphysically on it's shortest side, while removing both the lines setting rotations leaves the shape unmoved, but now it falls over to the right.
I recommend not using local rotation for polygons. Go ahead and pre-rotate the vertices yourself.

Polygons in 2.0 won't support any local offsets. They are too troublesome and not necessary.
Fair enough then. I see you've moved mass calculations to b2Shape from b2ShapeDef anyway, which makes much more sense.

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