summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 6b1ce3e38c7b..2dc7c1180e0a 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -1641,15 +1641,12 @@ bool ServerFont::ApplyGSUB( const FontSelectPattern& rFSD )
pScriptTable += 4;
sal_uInt16 nLangsysOffset = 0;
- for( sal_uInt16 nLangsysIndex = 0; nLangsysIndex < nCntLangSystem; ++nLangsysIndex )
+ if (nCntLangSystem != 0)
{
- const sal_uInt16 nOffset= GetUShort( pScriptTable+4 );
- pScriptTable += 6;
- nLangsysOffset = nOffset;
- break;
+ nLangsysOffset = GetUShort( pScriptTable+4 );
}
- if( (nDefaultLangsysOfs != 0) && (nDefaultLangsysOfs != nLangsysOffset) )
+ if (nDefaultLangsysOfs != 0 && nDefaultLangsysOfs != nLangsysOffset)
{
const FT_Byte* pLangSys = pGsubBase + nOfsScriptList + nOfsScriptTable + nDefaultLangsysOfs;
const sal_uInt16 nReqFeatureIdx = GetUShort( pLangSys+2 );