From 233a2fe441461645392d10077a230ca19bd1a924 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 2 Oct 2014 20:28:34 +0100 Subject: coverity#736943 try swapping arguments around as an experiment Change-Id: I89f0cfc9049503318955d58dde3f9a3e1197c45d --- vcl/generic/fontmanager/fontmanager.cxx | 4 ++-- 1 file 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++ ) { -- cgit