diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-08-17 00:33:57 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-08-17 10:22:56 +0400 |
commit | b12e0b522b7f13d15d2ce41dc1e99997c0159d53 (patch) | |
tree | 8076bc5f5602bb98bdf60a8e5719652974aaebbe | |
parent | defbcb229a08f0a147cfdc2c8476684694ad184f (diff) |
fdo#68186: prevent integer underflow
since commit eb1ecd8bc2936e28be852722d6cb0c9fb0baeac4 the Basic Latin subset
starts at 0, previously it started at 0x20.
Change-Id: I2fe0ee66438b8f11775b1bb8feab547b564622f0
-rw-r--r-- | svx/source/dialog/charmap.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index c68b3928bcf2..4f1cbf621323 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -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 ); |