X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fmetaballs.c;h=d814a80c29cd4ddabd5e44d2e90cea825ef740d3;hb=ffd8c0873576a9e3065696a624dce6b766b77062;hp=5d0f63dbc67c237b693023f9605c39dfe25384c2;hpb=4cecfc89e5e889c7232693897c06168fb378bd5c;p=xscreensaver diff --git a/hacks/metaballs.c b/hacks/metaballs.c index 5d0f63db..d814a80c 100644 --- a/hacks/metaballs.c +++ b/hacks/metaballs.c @@ -56,7 +56,7 @@ typedef struct short xpos,ypos; } BLOB; -static unsigned char nBlobCount; +static unsigned int nBlobCount; static unsigned char radius; static unsigned char delta; static unsigned char dradius; @@ -225,7 +225,7 @@ static void Initialize( Display *pDisplay, Window Win, GC *pGC, XImage **ppImage /* Find the preferred bits-per-pixel. (jwz) */ { - int i, pfvc = 0; + int pfvc = 0; XPixmapFormatValues *pfv = XListPixmapFormats( pDisplay, &pfvc ); for( i=0; i> 3); + if (radius >= 128) /* should use UCHAR_MAX? */ + radius = 127; /* dradius should fit in u_char */ dradius = radius * 2; sradius = radius * radius;