summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-10-07 12:11:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2010-10-07 12:11:51 +0100
commite9dcc7c126aa995c6bf9230caa5f33ba34c27bfb (patch)
treee661e0add29f4060eec0b9f9e6c2f5d9181d37bf
parentc5002288f6868b83e586dcf79d23cc3b838a9712 (diff)
#i114702# fix an off by one
-rw-r--r--vcl/unx/source/fontmanager/fontcache.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/unx/source/fontmanager/fontcache.cxx b/vcl/unx/source/fontmanager/fontcache.cxx
index db4a7d05e5fc..0c43373bfa8e 100644
--- a/vcl/unx/source/fontmanager/fontcache.cxx
+++ b/vcl/unx/source/fontmanager/fontcache.cxx
@@ -373,9 +373,9 @@ void FontCache::read()
xub_StrLen nLastIndex = nIndex+1;
for( nIndex = nLastIndex ; nIndex < nLen && pLine[nIndex] != ';'; nIndex++ )
;
- if( nIndex - nLastIndex > 1 )
+ if( nIndex - nLastIndex )
{
- OUString aAlias( pLine+nLastIndex, nIndex-nLastIndex-1, RTL_TEXTENCODING_UTF8 );
+ OUString aAlias( pLine+nLastIndex, nIndex-nLastIndex, RTL_TEXTENCODING_UTF8 );
pFont->m_aAliases.push_back( pAtoms->getAtom( ATOM_FAMILYNAME, aAlias, sal_True ) );
}
}