raster scaling: fix accessing out of bounds pixels

This commit is contained in:
Jiri Drbalek 2016-03-04 10:58:12 +00:00
parent 23fb010ea2
commit 4d402c5ef1

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_;