changeset 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 f733c048a94f
children c5169b89787f
files src/video/windib/SDL_dibvideo.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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;