Fix infinite loop when rectgrid() is called with w == 0 or h == 0.

This commit is contained in:
David Capello 2012-08-02 19:50:27 -03:00
parent 525851e6a1
commit f5ad8c86d3

View File

@ -314,6 +314,9 @@ void rectdotted(BITMAP* bmp, int x1, int y1, int x2, int y2, int fg, int bg)
void rectgrid(BITMAP* bmp, int x1, int y1, int x2, int y2, int w, int h)
{
if (w < 1 || h < 1)
return;
int x, y, u, v, c1, c2;
c1 = makecol_depth(bitmap_color_depth(bmp), 128, 128, 128);