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); } } }