X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fcoral.c;h=e17d4951f471db1634077d4ca7a7c6a93bb1507b;hb=3f9592851ce4ed76a9979bfdd6ec7dc5c457e183;hp=7621d5eee4818b4b8b830547f9c77fc24535cf46;hpb=f65151994eba80ecabcdac6eef6fa0dde7e2d45b;p=xscreensaver diff --git a/hacks/coral.c b/hacks/coral.c index 7621d5ee..e17d4951 100644 --- a/hacks/coral.c +++ b/hacks/coral.c @@ -88,8 +88,8 @@ init_coral(Display *dpy, Window window) for( i = 0; i < seeds; i++ ) { int x, y; do { - x = random() % width; - y = random() % height; + x = 1 + random() % (width - 2); + y = 1 + random() % (height - 2); } while( getdot(x, y) ); setdot((x-1), (y-1)); setdot(x, (y-1)); setdot((x+1), (y-1));