mirror of
https://github.com/yawut/SDL.git
synced 2026-10-02 05:06:46 -05:00
Make the list NULL terminated.
--HG-- branch : SDL-1.2
This commit is contained in:
@@ -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 *));
|
||||
|
||||
Reference in New Issue
Block a user