diff --git a/plugins/input/raster/raster_featureset.cpp b/plugins/input/raster/raster_featureset.cpp index bab865f8d..d3a4680b5 100644 --- a/plugins/input/raster/raster_featureset.cpp +++ b/plugins/input/raster/raster_featureset.cpp @@ -97,7 +97,7 @@ feature_ptr raster_featureset::next() // clip to available data if (x_off >= image_width) x_off = image_width - 1; - if (y_off >= image_width) y_off = image_width - 1; + if (y_off >= image_height) y_off = image_height - 1; if (x_off < 0) x_off = 0; if (y_off < 0) y_off = 0; if (end_x > image_width) end_x = image_width;