changeset 10908:2a6297d0ddf9

8074330: Set font anchors more solidly Reviewed-by: prr, srl, mschoene
author vadim
date Tue, 07 Apr 2015 14:33:53 +0300
parents d1d6bc3d0218
children db834667e996
files src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp	Tue Apr 07 14:33:49 2015 +0300
+++ b/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp	Tue Apr 07 14:33:53 2015 +0300
@@ -97,13 +97,9 @@
 
     if( LE_FAILURE(success) ) { return 0; }
     Offset anchorTableOffset = SWAPW(baseRecord->baseAnchorTableOffsetArray[markClass]);
-    if (anchorTableOffset <= 0) {
-        // this means the table is mal-formed...
-        glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition());
-        return 0;
-    }
+    LEReferenceTo<AnchorTable> anchorTable(baseArray, success, anchorTableOffset);
+    if( LE_FAILURE(success) ) { return 0; }
 
-    LEReferenceTo<AnchorTable> anchorTable(baseArray, success, anchorTableOffset);
     LEPoint baseAnchor, markAdvance, pixels;