X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fanalogtv.c;h=487b2efd50eff2f7241e4f0afdcd93e97a66e9b2;hp=85ced09c9a1a14dd8829e96c9a86d5f8bf6ec0c4;hb=ffd8c0873576a9e3065696a624dce6b766b77062;hpb=e4fa2ac140f7bc56571373a7b7eb585fa4500e38 diff --git a/hacks/analogtv.c b/hacks/analogtv.c index 85ced09c..487b2efd 100644 --- a/hacks/analogtv.c +++ b/hacks/analogtv.c @@ -1,4 +1,4 @@ -/* analogtv, Copyright (c) 2003 Trevor Blackwell +/* analogtv, Copyright (c) 2003, 2004 Trevor Blackwell * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -264,8 +264,9 @@ analogtv_alloc_image(analogtv *it) if (!it->image) { it->image = XCreateImage(it->dpy, it->xgwa.visual, it->xgwa.depth, ZPixmap, 0, 0, it->usewidth, it->useheight, 8, 0); - it->image->data = (char *)calloc(it->image->height, it->image->bytes_per_line); + it->image->data = (char *)malloc(it->image->height * it->image->bytes_per_line); } + memset (it->image->data, 0, it->image->height * it->image->bytes_per_line); }