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