[set] Fix crash

Ouch!  That's what happens when one plays with increment/decrement operators!

Fixes https://github.com/behdad/harfbuzz/issues/578
This commit is contained in:
Behdad Esfahbod 2017-10-23 14:26:48 -04:00
parent 61d1c60a1c
commit 8170801d78
1 changed files with 6 additions and 4 deletions

View File

@ -331,10 +331,12 @@ struct hb_set_t
b--;
}
}
while (a >= 0)
page_at (--count).v = page_at (--a).v;
while (b >= 0)
page_at (--count).v = other->page_at (--b).v;
if (Op::passthru_left)
while (a >= 0)
page_at (--count).v = page_at (a--).v;
if (Op::passthru_right)
while (b >= 0)
page_at (--count).v = other->page_at (b--).v;
assert (!count);
}