Make the list NULL terminated.
--HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403833
This commit is contained in:
parent
4c2eb9da70
commit
4ba3f48db5
1 changed files with 2 additions and 1 deletions
|
@ -522,7 +522,7 @@ static int XBIOS_VideoInit(_THIS, SDL_PixelFormat *vformat)
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
SDL_xbiosmode[i] = (xbiosmode_t **)
|
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 ) {
|
if ( SDL_xbiosmode[i] == NULL ) {
|
||||||
SDL_OutOfMemory();
|
SDL_OutOfMemory();
|
||||||
return(-1);
|
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_memset(SDL_xbiosmode[i][j], 0, sizeof(xbiosmode_t));
|
||||||
}
|
}
|
||||||
|
SDL_xbiosmode[i][j] = NULL;
|
||||||
|
|
||||||
SDL_modelist[i] = (SDL_Rect **)
|
SDL_modelist[i] = (SDL_Rect **)
|
||||||
SDL_malloc((SDL_nummodes[i]+1)*sizeof(SDL_Rect *));
|
SDL_malloc((SDL_nummodes[i]+1)*sizeof(SDL_Rect *));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue