Fixed inifinite loop introduced in 7403e055cd

k is the index, not j.

Reported by Tom Hacohen.
This commit is contained in:
Behdad Esfahbod 2011-05-30 11:08:40 -04:00
parent 51881a61ca
commit 21deab2bdc
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}