[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Jan 26 23:20:41 UTC 2018


 src/hb-ot-kern-table.hh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 85be365ed9238caf0283346ab4e5c5127096fc8a
Author: bungeman <bungeman at chromium.org>
Date:   Fri Jan 26 13:38:06 2018 -0500

    Use KernSubTableFormat2::rightClassTable
    
    Issue originally reported at http://cppfiles.com/chromium.txt .
    
    This fixes what appears to be a copy - paste issue which causes both
    KernSubTableFormat2::rightClassTable and the 'right' argument to
    KernSubTableFormat2::get_kerning to go unused.

diff --git a/src/hb-ot-kern-table.hh b/src/hb-ot-kern-table.hh
index 86c13862..368f547a 100644
--- a/src/hb-ot-kern-table.hh
+++ b/src/hb-ot-kern-table.hh
@@ -115,7 +115,7 @@ struct KernSubTableFormat2
   inline int get_kerning (hb_codepoint_t left, hb_codepoint_t right, const char *end) const
   {
     unsigned int l = (this+leftClassTable).get_class (left);
-    unsigned int r = (this+leftClassTable).get_class (left);
+    unsigned int r = (this+rightClassTable).get_class (right);
     unsigned int offset = l * rowWidth + r * sizeof (FWORD);
     const FWORD *arr = &(this+array);
     if (unlikely ((const void *) arr < (const void *) this || (const void *) arr >= (const void *) end))


More information about the HarfBuzz mailing list