X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fsubstrate.c;fp=hacks%2Fsubstrate.c;h=c63ceb957aadeddd73999e6cf9bbe74a220d6063;hp=52d031cc032804d5beb46e98ceee641569fd4d2b;hb=d1ae2829ff0fd2a96c16a0c8c5420efaa47d7b30;hpb=7edd66e6bd3209013ee059819747b10b5835635b diff --git a/hacks/substrate.c b/hacks/substrate.c index 52d031cc..c63ceb95 100644 --- a/hacks/substrate.c +++ b/hacks/substrate.c @@ -472,7 +472,12 @@ static void build_substrate(struct field *f) /* erase the crack grid */ f->cgrid = (int *) xrealloc(f->cgrid, sizeof(int) * f->height * f->width); - memset(f->cgrid, 10001, f->height * f->width * sizeof(int)); + { + int j; + int *p = f->cgrid; + for (j = 0; j < f->height * f->width; j++) + *p++ = 10001; + } /* Not necessary now that make_crack ensures we have usable default * values in start_crack's timeout case