Fix unsigned underflow.

This commit is contained in:
Hermann Kraus 2011-12-23 15:01:28 +01:00
parent d0e3f683ed
commit 656749de14

View file

@ -138,7 +138,7 @@ void raster_colorizer::colorize(raster_ptr const& raster,const std::map<std::str
inline unsigned interpolate(unsigned start, unsigned end, float fraction)
{
return static_cast<unsigned>(fraction * (end - start) + start);
return static_cast<unsigned>(fraction * ((float)end - (float)start) + start);
}
color raster_colorizer::get_color(float value) const {