diff -r 3e1ebbbaba54 -r 16772bbb1b09 IMG_lbm.c --- a/IMG_lbm.c Wed Jan 24 01:43:46 2018 -0500 +++ b/IMG_lbm.c Wed Jan 24 01:44:36 2018 -0500 @@ -245,7 +245,7 @@ goto done; } - if ( ( Image = SDL_CreateRGBSurface( SDL_SWSURFACE, width, bmhd.h, (bmhd.planes==24 || flagHAM==1)?24:8, 0, 0, 0, 0 ) ) == NULL ) + if ( ( Image = SDL_CreateRGBSurface( SDL_SWSURFACE, width, bmhd.h, (nbplanes==24 || flagHAM==1)?24:8, 0, 0, 0, 0 ) ) == NULL ) goto done; if ( bmhd.mask & 2 ) /* There is a transparent color */ @@ -272,7 +272,7 @@ /* The 32 last colors are the same but divided by 2 */ /* Some Amiga pictures save 64 colors with 32 last wrong colors, */ /* they shouldn't !, and here we overwrite these 32 bad colors. */ - if ( (nbcolors==32 || flagEHB ) && (1< (1< (1<