Assertion failed, possible library issues?

I'm attempting to create a class based dynamic object creation system and I've encountered an issue compiling. I'm only partly sure that it was caused by making b2World World a static class entity, but I'm not really sure(my debugger is pretty lousy).

First, it spits this out:
Code:
Assertion failed: area > 1.19209290e-7F, file D:\Source\Packages\Box2D_v2.1.2\Box2D\Box2D\Collision\
Shapes\b2PolygonShape.cpp, line 428

Afterwards, it stalls, it attempts to resolve itself for a while, and then returns 3 when I tell it to terminate.

Here's the source code
That one is usually caused by specifying a polygon that has the vertex winding backwards, or is not a convex polygon.
How exactly would I fix that? I'm working with boxes, so it can't be a concave polygon issue, and I'm not sure if I've done anything wrong as far as vertex winding goes. If I messed up, can you tell me where?
Code:
Box(int x, int y = 0);


The default height is zero --> zero area box.

BTW, this is one reason why I don't like default argument values. They hide bugs.
I've since changed my code quite a bit (Still dealing with a similar issue though), but in the above source, it has an if statement that changes y to x to form a square if y = 0. Shouldn't that prevent any issues?
Aha! I'm surprised neither of you caught this. It was my if statement, which instead of doing 'width == 0' did 'if (width = 0)'. Thanks for your help(?), guys! 😀
I recommend not using such convoluted logic. Make your APIs simple and direct without weird side effects.

Also, when you have a problem in your code you should step through line-by-line using the debugger. You would have easily caught this problem that way.

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