[set] Minor

In preparation to fix https://github.com/harfbuzz/harfbuzz/issues/863

Binary operations are sets are completely broken. Ouch.
This commit is contained in:
Behdad Esfahbod 2018-03-07 09:55:22 +01:00
parent e4cbb87bd3
commit 7587683cdc
1 changed files with 14 additions and 7 deletions

View File

@ -430,19 +430,26 @@ struct hb_set_t
{
a--;
b--;
Op::process (page_at (--count).v, page_at (a).v, other->page_at (b).v);
count--;
Op::process (page_at (count).v, page_at (a).v, other->page_at (b).v);
}
else if (page_map[a - 1].major > other->page_map[b - 1].major)
{
a--;
if (Op::passthru_left)
page_at (--count).v = page_at (a).v;
a--;
if (Op::passthru_left)
{
count--;
page_at (count).v = page_at (a).v;
}
}
else
{
b--;
if (Op::passthru_right)
page_at (--count).v = other->page_at (b).v;
b--;
if (Op::passthru_right)
{
count--;
page_at (count).v = other->page_at (b).v;
}
}
}
if (Op::passthru_left)