Fixed crash when given video modes > 32 bpp SDL-1.2
authorSam Lantinga
Thu, 27 Dec 2007 13:59:41 +0000
branchSDL-1.2
changeset 40961859647893b8
parent 4095 f733c048a94f
child 4097 c5169b89787f
Fixed crash when given video modes > 32 bpp
src/video/windib/SDL_dibvideo.c
     1.1 --- a/src/video/windib/SDL_dibvideo.c	Tue Sep 25 09:59:26 2007 +0000
     1.2 +++ b/src/video/windib/SDL_dibvideo.c	Thu Dec 27 13:59:41 2007 +0000
     1.3 @@ -213,7 +213,7 @@
     1.4  	int next_mode;
     1.5  
     1.6  	/* Check to see if we already have this mode */
     1.7 -	if ( bpp < 8 ) {  /* Not supported */
     1.8 +	if ( bpp < 8 || bpp > 32 ) {  /* Not supported */
     1.9  		return(0);
    1.10  	}
    1.11  	index = ((bpp+7)/8)-1;