X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/222ed1d678dff2f5c3c4164321dd05e8f47de487..0a2f5c7bc59906224f8ff93940e0bda33214c963:/src/common/image.cpp diff --git a/src/common/image.cpp b/src/common/image.cpp index 5192bc06d8..d9f07d30b2 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -303,9 +303,9 @@ wxImage wxImage::ShrinkBy( int xFactor , int yFactor ) const } else { - *(target_data++) = avgRed / counter ; - *(target_data++) = avgGreen / counter ; - *(target_data++) = avgBlue / counter ; + *(target_data++) = (unsigned char)(avgRed / counter); + *(target_data++) = (unsigned char)(avgGreen / counter); + *(target_data++) = (unsigned char)(avgBlue / counter); } } }