diff options
author | Grigori Goronzy <greg@blackbox> | 2010-06-07 20:21:41 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2010-06-07 20:21:41 +0200 |
commit | 7ac975641bf4364d7c9b35ecead5b9c2a87468d6 (patch) | |
tree | 802cfa1286318a2bb5227477fcf40da7f54eb0e0 | |
parent | b965ecacd8a850e9b4af2198798b9d07e25fafbc (diff) | |
download | libass-7ac975641bf4364d7c9b35ecead5b9c2a87468d6.tar.bz2 libass-7ac975641bf4364d7c9b35ecead5b9c2a87468d6.tar.xz |
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.
-rw-r--r-- | libass/ass_render.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |