From 7ac975641bf4364d7c9b35ecead5b9c2a87468d6 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 7 Jun 2010 20:21:41 +0200 Subject: Fix off-by-one error in cbox calculation The last point wasn't included in cbox calculation, sometimes triggering removal of inside contours when it wasn't needed. --- libass/ass_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libass/ass_render.c b/libass/ass_render.c index 64e78a9..3084463 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -906,7 +906,7 @@ get_contour_cbox(FT_BBox *box, FT_Vector *points, int start, int end) box->xMax = box->yMax = INT_MIN; int i; - for (i = start; i < end; i++) { + for (i = start; i <= end; i++) { box->xMin = (points[i].x < box->xMin) ? points[i].x : box->xMin; box->xMax = (points[i].x > box->xMax) ? points[i].x : box->xMax; box->yMin = (points[i].y < box->yMin) ? points[i].y : box->yMin; -- cgit v1.2.3