]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/quantize.cpp
corrected Get() return value
[wxWidgets.git] / src / common / quantize.cpp
index b89425443b09312c0db78989249839a05b4b178e..c230b983d9d8d04aeca96563d0ed43c484611ad1 100644 (file)
@@ -77,7 +77,9 @@
 
 typedef unsigned short UINT16;
 typedef signed short INT16;
+#if !(defined(__WATCOMC__) && defined(__WXMSW__))
 typedef signed int INT32;
+#endif
 
 typedef unsigned char JSAMPLE;
 typedef JSAMPLE *JSAMPROW;
@@ -1569,7 +1571,7 @@ bool wxQuantize::Quantize(const wxImage& src, wxImage& dest,
             // We need to shift the palette entries up
             // to make room for the Windows system colours.
             for (i = 0; i < w * h; i++)
-                data8bit[i] = data8bit[i] + paletteShift;
+                data8bit[i] = (unsigned char)(data8bit[i] + paletteShift);
         }
 #endif
         *eightBitData = data8bit;
@@ -1654,4 +1656,3 @@ bool wxQuantize::Quantize(const wxImage& src,
 
 #endif
     // wxUSE_IMAGE
-