src/video/SDL_surface.c
changeset 7482 249d8ecbbb7d
parent 7363 75b8a207cb65
child 7508 1f64c6874619
equal deleted inserted replaced
7481:5ff71e03d9eb 7482:249d8ecbbb7d
   176 
   176 
   177     if (!surface) {
   177     if (!surface) {
   178         return SDL_InvalidParamError("surface");
   178         return SDL_InvalidParamError("surface");
   179     }
   179     }
   180 
   180 
   181     if (surface->format->palette && key >= surface->format->palette->ncolors) {
   181     if (surface->format->palette && key >= ((Uint32) surface->format->palette->ncolors)) {
   182         return SDL_InvalidParamError("key");
   182         return SDL_InvalidParamError("key");
   183     }
   183     }
   184 
   184 
   185     if (flag & SDL_RLEACCEL) {
   185     if (flag & SDL_RLEACCEL) {
   186         SDL_SetSurfaceRLE(surface, 1);
   186         SDL_SetSurfaceRLE(surface, 1);