From 656749de14305995d6cb6bc45dcbf03d8cb3e677 Mon Sep 17 00:00:00 2001 From: Hermann Kraus Date: Fri, 23 Dec 2011 15:01:28 +0100 Subject: [PATCH] Fix unsigned underflow. --- src/raster_colorizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raster_colorizer.cpp b/src/raster_colorizer.cpp index 95aec3cb7..554592246 100644 --- a/src/raster_colorizer.cpp +++ b/src/raster_colorizer.cpp @@ -138,7 +138,7 @@ void raster_colorizer::colorize(raster_ptr const& raster,const std::map(fraction * (end - start) + start); + return static_cast(fraction * ((float)end - (float)start) + start); } color raster_colorizer::get_color(float value) const {