diff src/video/windib/SDL_dibvideo.c @ 4096:1859647893b8 SDL-1.2

Fixed crash when given video modes > 32 bpp
author Sam Lantinga <slouken@libsdl.org>
date Thu, 27 Dec 2007 13:59:41 +0000
parents 51486c979189
children 822f9624f984
line wrap: on
line diff
--- 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;