summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-10 09:28:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-10 12:50:18 +0100
commitb9d4244b8f71c9d952ef7eb19022eb09cbfe0a46 (patch)
tree7b039963b3d058dc4a28a8941dd0674ebe8885e6
parent1c3e3557dbb2f235dcd05e35ec835d2da721b975 (diff)
coverity#736943 try another experimental warning workaround
Change-Id: I4fc951e21915f7cbb03ee10fd2c9c4977a2f510a
-rw-r--r--vcl/generic/fontmanager/fontmanager.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 05fc829d0e5e..746d8395b51b 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -845,8 +845,8 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
//http://processingjs.nihongoresources.com/the_smallest_font/
//https://github.com/grzegorzrolek/null-ttf
const int nMaxFontsPossible = fileSize / 528;
-
- nLength = std::min(nMaxFontsPossible, nLength);
+ if (nLength > nMaxFontsPossible)
+ nLength = nMaxFontsPossible;
for( int i = 0; i < nLength; i++ )
{