Commit dd81dad1ad407390d55cc818f64552e523c459b5

Ryan C. Gordon 2014-03-24T07:12:26

Added an assert to help static analyzer.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
index 6d24aa2..7978635 100644
--- a/src/video/SDL_bmp.c
+++ b/src/video/SDL_bmp.c
@@ -33,6 +33,7 @@
 */
 
 #include "SDL_video.h"
+#include "SDL_assert.h"
 #include "SDL_endian.h"
 #include "SDL_pixels_c.h"
 
@@ -268,6 +269,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
     /* Load the palette, if any */
     palette = (surface->format)->palette;
     if (palette) {
+        SDL_assert(biBitCount <= 8);
         if (biClrUsed == 0) {
             biClrUsed = 1 << biBitCount;
         }