sdl12-compat: video: Initialze the screen surface's pixels during SDL_SetVideoMode.

From b35bb7c0867fb119e6d8c835bc57a4639c12e1e5 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 10 Jan 2023 20:14:00 -0500
Subject: [PATCH] video: Initialze the screen surface's pixels during
 SDL_SetVideoMode.

Reference Issue #283.
---
 src/SDL12_compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 8cbcf7304..64c3836c5 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -6195,7 +6195,7 @@ SetVideoModeImpl(int width, int height, int bpp, Uint32 flags12)
         }
 
         VideoSurface12->flags &= ~SDL12_OPENGL;
-        VideoSurface12->surface20->pixels = SDL20_malloc(height * VideoSurface12->pitch);
+        VideoSurface12->surface20->pixels = SDL20_calloc(height, VideoSurface12->pitch);
         VideoSurface12->pixels = VideoSurface12->surface20->pixels;
         if (!VideoSurface12->pixels) {
             SDL20_OutOfMemory();