]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/xpmdecod.cpp
switched to new XPM code in wxMSW
[wxWidgets.git] / src / common / xpmdecod.cpp
index 08ad872940368b948287f389f4f9beaf408c8ffb..d317187e2b91c72a009827423ea38dc04de8fd61 100644 (file)
@@ -560,9 +560,9 @@ static bool GetRGBFromName(const char *inname, bool *isNone,
         if ( cmp == 0 )
         {
             rgbVal = theRGBRecords[middle].rgb;
-            *r = (rgbVal >> 16) & 0xFF;
-            *g = (rgbVal >> 8) & 0xFF;
-            *b = (rgbVal) & 0xFF;
+            *r = (unsigned char)((rgbVal >> 16) & 0xFF);
+            *g = (unsigned char)((rgbVal >> 8) & 0xFF);
+            *b = (unsigned char)((rgbVal) & 0xFF);
             *isNone = FALSE;
             free(name);
             return TRUE;