Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed compiler warning on Visual C++
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 7, 2011
1 parent 32c3182 commit b621ac6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/SDL_pixels.c 100644 → 100755
Expand Up @@ -816,7 +816,7 @@ SDL_GetRGB(Uint32 pixel, const SDL_PixelFormat * format, Uint8 * r, Uint8 * g,
v = (pixel & format->Bmask) >> format->Bshift;
*b = SDL_expand_byte[format->Bloss][v];
} else {
if (pixel < format->palette->ncolors) {
if (pixel < (unsigned)format->palette->ncolors) {
*r = format->palette->colors[pixel].r;
*g = format->palette->colors[pixel].g;
*b = format->palette->colors[pixel].b;
Expand All @@ -841,7 +841,7 @@ SDL_GetRGBA(Uint32 pixel, const SDL_PixelFormat * format,
v = (pixel & format->Amask) >> format->Ashift;
*a = SDL_expand_byte[format->Aloss][v];
} else {
if (pixel < format->palette->ncolors) {
if (pixel < (unsigned)format->palette->ncolors) {
*r = format->palette->colors[pixel].r;
*g = format->palette->colors[pixel].g;
*b = format->palette->colors[pixel].b;
Expand Down

0 comments on commit b621ac6

Please sign in to comment.