Commit 4ba3f48d authored by Patrice Mandin's avatar Patrice Mandin

Make the list NULL terminated.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403833
parent 4c2eb9da
......@@ -522,7 +522,7 @@ static int XBIOS_VideoInit(_THIS, SDL_PixelFormat *vformat)
int j;
SDL_xbiosmode[i] = (xbiosmode_t **)
SDL_malloc(SDL_nummodes[i]*sizeof(xbiosmode_t *));
SDL_malloc((SDL_nummodes[i]+1)*sizeof(xbiosmode_t *));
if ( SDL_xbiosmode[i] == NULL ) {
SDL_OutOfMemory();
return(-1);
......@@ -535,6 +535,7 @@ static int XBIOS_VideoInit(_THIS, SDL_PixelFormat *vformat)
}
SDL_memset(SDL_xbiosmode[i][j], 0, sizeof(xbiosmode_t));
}
SDL_xbiosmode[i][j] = NULL;
SDL_modelist[i] = (SDL_Rect **)
SDL_malloc((SDL_nummodes[i]+1)*sizeof(SDL_Rect *));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment