From 21deab2bdc58d8e9f1a3ba1f9c61c30a79e288a1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 30 May 2011 11:08:40 -0400 Subject: [PATCH] Fixed inifinite loop introduced in 7403e055cd1463f k is the index, not j. Reported by Tom Hacohen. --- src/hb-ot-layout-gpos-private.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-layout-gpos-private.hh b/src/hb-ot-layout-gpos-private.hh index d51a2b08f..59750ab1a 100644 --- a/src/hb-ot-layout-gpos-private.hh +++ b/src/hb-ot-layout-gpos-private.hh @@ -1553,12 +1553,12 @@ fix_mark_attachment (hb_glyph_position_t *pos, unsigned int i, hb_direction_t di pos[i].y_offset += pos[j].y_offset; if (HB_DIRECTION_IS_FORWARD (direction)) - for (unsigned int k = j; k < i; j++) { + for (unsigned int k = j; k < i; k++) { pos[i].x_offset -= pos[k].x_advance; pos[i].y_offset -= pos[k].y_advance; } else - for (unsigned int k = j + 1; k < i + 1; j++) { + for (unsigned int k = j + 1; k < i + 1; k++) { pos[i].x_offset += pos[k].x_advance; pos[i].y_offset += pos[k].y_advance; }