From 30211b69a9d16280a47b84a1bb8fda7ec15ff734 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 27 Dec 2007 13:59:41 +0000 Subject: [PATCH] Fixed crash when given video modes > 32 bpp --- src/video/windib/SDL_dibvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/windib/SDL_dibvideo.c b/src/video/windib/SDL_dibvideo.c index d86b45770..8263fc62a 100644 --- a/src/video/windib/SDL_dibvideo.c +++ b/src/video/windib/SDL_dibvideo.c @@ -213,7 +213,7 @@ static int DIB_AddMode(_THIS, int bpp, int w, int h) 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;