rnd-20021123-1-src
[rocksndiamonds.git] / src / libgame / image.c
index 3e89c8b196340dfd259d5e469cfb33da1d134c1c..8e69de5460a4b518d0c4fb40320abacc0bbd5078 100644 (file)
@@ -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;