raster scaling: fix accessing out of bounds pixels

This commit is contained in:
Jiri Drbalek 2016-03-04 10:58:12 +00:00 committed by artemp
parent 196b24c972
commit f5d6b19fb4

View file

@ -81,7 +81,7 @@ public:
int src_x = x >> agg::image_subpixel_shift;
int src_y = y >> agg::image_subpixel_shift;
const value_type* pix = reinterpret_cast<const value_type*>(base_type::source().span(src_x, src_y, 0));
const value_type* pix = reinterpret_cast<const value_type*>(base_type::source().span(src_x, src_y, 1));
if (nodata_value_ && *nodata_value_ == *pix)
{
span->v = *nodata_value_;