From 5f4adb9bf37e19a0dfb8bbdc690406215bd76d85 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Mon, 25 Jul 2022 21:59:57 +0000 Subject: [PATCH] [repacker] fix to lookup size comparison. --- src/hb-repacker.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-repacker.hh b/src/hb-repacker.hh index e62947d9a..ca629893b 100644 --- a/src/hb-repacker.hh +++ b/src/hb-repacker.hh @@ -57,7 +57,7 @@ inline int compare_sizes (const void* a, const void* b) double subtables_per_byte_b = (double) size_b->num_subtables / (double) size_b->size; if (subtables_per_byte_a == subtables_per_byte_b) { - return size_b->lookup_index - size_b->lookup_index; + return size_b->lookup_index - size_a->lookup_index; } double cmp = subtables_per_byte_b - subtables_per_byte_a;