test/testpalette.c
changeset 2851 6c3fbeb04eca
parent 2735 204be4fc2726
child 2855 422452508c76
     1.1 --- a/test/testpalette.c	Sun Dec 07 22:04:24 2008 +0000
     1.2 +++ b/test/testpalette.c	Sun Dec 07 22:25:16 2008 +0000
     1.3 @@ -189,6 +189,8 @@
     1.4      SDL_SetColorKey(boat[0], SDL_SRCCOLORKEY | SDL_RLEACCEL,
     1.5                      SDL_MapRGB(boat[0]->format, 0xff, 0x00, 0xff));
     1.6      boatcols = boat[0]->format->palette->ncolors;
     1.7 +    if (boatcols >= 256)
     1.8 +        sdlerr("too many colors in sail.bmp");
     1.9      boat[1] = hflip(boat[0]);
    1.10      SDL_SetColorKey(boat[1], SDL_SRCCOLORKEY | SDL_RLEACCEL,
    1.11                      SDL_MapRGB(boat[1]->format, 0xff, 0x00, 0xff));