< prev index next >
src/java.desktop/share/native/libfontmanager/layout/LigatureSubstProc.cpp
Print this page
rev 15133 : 8161923: Fix two memory issues.
Reviewed-by: vadim
@@ -148,15 +148,16 @@
return newState;
}
TTGlyphID ligatureGlyph = SWAPW(*ligatureOffset.getAlias());
glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph);
- if(mm==nComponents) {
+ ++mm;
+ if (mm == nComponents) {
LE_DEBUG_BAD_FONT("exceeded nComponents");
mm--; // don't overrun the stack.
}
- stack[++mm] = componentGlyph;
+ stack[mm] = componentGlyph;
i = 0;
} else {
glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF);
}
}
< prev index next >