Kaydet (Commit) b12e0b52 authored tarafından Ivan Timofeev's avatar Ivan Timofeev

fdo#68186: prevent integer underflow

since commit eb1ecd8b the Basic Latin subset
starts at 0, previously it started at 0x20.

Change-Id: I2fe0ee66438b8f11775b1bb8feab547b564622f0
üst defbcb22
......@@ -650,7 +650,7 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, sal_Bool bFocus )
void SvxShowCharSet::SelectCharacter( sal_UCS4 cNew, sal_Bool bFocus )
{
// get next available char of current font
sal_UCS4 cNext = maFontCharMap.GetNextChar( cNew - 1 );
sal_UCS4 cNext = maFontCharMap.GetNextChar( (cNew > 0) ? cNew - 1 : cNew );
int nMapIndex = maFontCharMap.GetIndexFromChar( cNext );
SelectIndex( nMapIndex, bFocus );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment