src/video/SDL_surface.c
changeset 1920 8a162bfdc838
parent 1895 c121d94672cb
child 2222 926294b2bb4e
     1.1 --- a/src/video/SDL_surface.c	Wed Jul 19 08:46:57 2006 +0000
     1.2 +++ b/src/video/SDL_surface.c	Sat Jul 22 08:33:18 2006 +0000
     1.3 @@ -42,12 +42,11 @@
     1.4      SDL_Surface *surface;
     1.5  
     1.6      /* Allocate the surface */
     1.7 -    surface = (SDL_Surface *) SDL_malloc(sizeof(*surface));
     1.8 +    surface = (SDL_Surface *) SDL_calloc(1, sizeof(*surface));
     1.9      if (surface == NULL) {
    1.10          SDL_OutOfMemory();
    1.11          return NULL;
    1.12      }
    1.13 -    SDL_zerop(surface);
    1.14  
    1.15      surface->format = SDL_AllocFormat(depth, Rmask, Gmask, Bmask, Amask);
    1.16      if (!surface->format) {