Skip to content

Commit

Permalink
Added an assert to help static analyzer.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 24, 2014
1 parent 26823b1 commit dd81dad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/video/SDL_bmp.c
Expand Up @@ -33,6 +33,7 @@
*/

#include "SDL_video.h"
#include "SDL_assert.h"
#include "SDL_endian.h"
#include "SDL_pixels_c.h"

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit dd81dad

Please sign in to comment.