Skip to content

Commit

Permalink
Fixed crash when given video modes > 32 bpp
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 27, 2007
1 parent a8220f8 commit 30211b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/windib/SDL_dibvideo.c
Expand Up @@ -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;
Expand Down

0 comments on commit 30211b6

Please sign in to comment.