From 8125f3670fe7f7e6dadf930b5dad62ab0b861315 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 7 Mar 2011 14:07:08 -0800 Subject: [PATCH] Fixed compiler warning on Visual C++ --- src/video/SDL_pixels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/video/SDL_pixels.c diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c old mode 100644 new mode 100755 index a6490795b..60f6833d3 --- a/src/video/SDL_pixels.c +++ b/src/video/SDL_pixels.c @@ -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; @@ -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;