X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fimage.c;h=8e69de5460a4b518d0c4fb40320abacc0bbd5078;hb=c12ae4bec59aed267be508426df06b948732daec;hp=3e89c8b196340dfd259d5e469cfb33da1d134c1c;hpb=64048311a753e16e92c29112a8a223a866ac45ef;p=rocksndiamonds.git diff --git a/src/libgame/image.c b/src/libgame/image.c index 3e89c8b1..8e69de54 100644 --- a/src/libgame/image.c +++ b/src/libgame/image.c @@ -37,8 +37,8 @@ Image *newImage(unsigned int width, unsigned int height, unsigned int depth) depth = 8; #endif - image = checked_malloc(sizeof(Image)); - image->data = checked_malloc(width * height * bytes_per_pixel); + image = checked_calloc(sizeof(Image)); + image->data = checked_calloc(width * height * bytes_per_pixel); image->width = width; image->height = height; image->depth = depth;