From 0313ef86e32a217e14950d46a3c3b98362a53dee Mon Sep 17 00:00:00 2001 From: qxliu76 <48925186+qxliu76@users.noreply.github.com> Date: Thu, 29 Aug 2019 14:09:05 -0700 Subject: [PATCH] bug fix in optimizing coverage table format (#1942) We are comparing number of shorts, NOT number of bytes. --- src/hb-ot-layout-common.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 176524a7d..a1e4bd160 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -1062,7 +1062,7 @@ struct Coverage last = g; count++; } - u.format = count * 2 < num_ranges * 3 ? 1 : 2; + u.format = count <= num_ranges * 3 ? 1 : 2; switch (u.format) {