From 02001da7a9af0f0a009987dfcf7fdd254949068f Mon Sep 17 00:00:00 2001 From: prr Date: Fri, 24 Jul 2015 09:46:46 -0700 Subject: [PATCH] 8103675: Better Binary searches Reviewed-by: srl, serb, mschoene --- src/share/native/sun/font/layout/LookupTables.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/share/native/sun/font/layout/LookupTables.cpp b/src/share/native/sun/font/layout/LookupTables.cpp index 6e7aa2795..d51d0d772 100644 --- a/src/share/native/sun/font/layout/LookupTables.cpp +++ b/src/share/native/sun/font/layout/LookupTables.cpp @@ -91,6 +91,10 @@ const LookupSingle *BinarySearchLookupTable::lookupSingle(const LETableReference LEReferenceTo entry(base, success, entries); LEReferenceTo trial(entry, success, extra); + if (!LE_SUCCESS(success)) { + return NULL; + } + if (SWAPW(trial->glyph) <= ttGlyph) { entry = trial; } -- GitLab