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