Skip to content

Commit

Permalink
Maurizio Monge - Sun May 14 13:57:32 PDT 2006
Browse files Browse the repository at this point in the history
 * Fixed loading BMP palettes at unusual offsets
  • Loading branch information
slouken committed May 14, 2006
1 parent 60de5e3 commit 9fc0706
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES
@@ -1,4 +1,6 @@
1.2.5:
Maurizio Monge - Sun May 14 13:57:32 PDT 2006
* Fixed loading BMP palettes at unusual offsets
Sam Lantinga - Thu May 11 21:51:19 PDT 2006
* Added support for dynamically loading libjpeg, libpng, and libtiff.
Sam Lantinga - Sun Apr 30 01:48:40 PDT 2006
Expand Down
6 changes: 6 additions & 0 deletions IMG_bmp.c
Expand Up @@ -309,6 +309,12 @@ static SDL_Surface *LoadBMP_RW (SDL_RWops *src, int freesrc)
/* Load the palette, if any */
palette = (surface->format)->palette;
if ( palette ) {
if ( SDL_RWseek(src, fp_offset+14+biSize, SEEK_SET) < 0 ) {
SDL_Error(SDL_EFSEEK);
was_error = 1;
goto done;
}

/*
| guich: always use 1<<bpp b/c some bitmaps can bring wrong information
| for colorsUsed
Expand Down

0 comments on commit 9fc0706

Please sign in to comment.