Fix deleting images by row not calculating image bounds correctly

Fixes #5081
This commit is contained in:
Kovid Goyal
2022-05-13 09:51:25 +05:30
parent 600c595fdf
commit cf8ccabad9
2 changed files with 3 additions and 1 deletions

View File

@@ -1505,7 +1505,7 @@ x_filter_func(const ImageRef *ref, Image UNUSED *img, const void *data, CellPixe
static bool
y_filter_func(const ImageRef *ref, Image UNUSED *img, const void *data, CellPixelSize cell UNUSED) {
const GraphicsCommand *g = data;
return ref->start_row <= (int32_t)g->y_offset - 1 && ((int32_t)(g->y_offset - 1 < ref->start_row + ref->effective_num_rows));
return ref->start_row <= (int32_t)g->y_offset - 1 && ((int32_t)g->y_offset - 1) < ((int32_t)(ref->start_row + ref->effective_num_rows));
}
static bool