Commit 3858fed0 authored by Sam Lantinga's avatar Sam Lantinga

Fixed crash when given video modes > 32 bpp

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402643
parent 014d56cb
...@@ -213,7 +213,7 @@ static int DIB_AddMode(_THIS, int bpp, int w, int h) ...@@ -213,7 +213,7 @@ static int DIB_AddMode(_THIS, int bpp, int w, int h)
int next_mode; int next_mode;
/* Check to see if we already have this mode */ /* Check to see if we already have this mode */
if ( bpp < 8 ) { /* Not supported */ if ( bpp < 8 || bpp > 32 ) { /* Not supported */
return(0); return(0);
} }
index = ((bpp+7)/8)-1; index = ((bpp+7)/8)-1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment