summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-02 20:28:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-03 09:07:55 +0100
commit233a2fe441461645392d10077a230ca19bd1a924 (patch)
tree8ac94b6c7454a67f9e2bd194350d991f945bfcf4
parenta0bd9fdadc02903a551f48cc1711069b33f1ab20 (diff)
coverity#736943 try swapping arguments around as an experiment
Change-Id: I89f0cfc9049503318955d58dde3f9a3e1197c45d
-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 e79c1d4ac1e1..273707699350 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -844,9 +844,9 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
//a sane starting point
//http://processingjs.nihongoresources.com/the_smallest_font/
//https://github.com/grzegorzrolek/null-ttf
- int nMaxFontsPossible = fileSize / 528;
+ const int nMaxFontsPossible = fileSize / 528;
- nLength = std::min(nLength, nMaxFontsPossible);
+ nLength = std::min(nMaxFontsPossible, nLength);
for( int i = 0; i < nLength; i++ )
{