[Libreoffice-commits] core.git: vcl/win

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Sep 9 20:01:10 UTC 2018


 vcl/win/gdi/salfont.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b90fa8698e1928b218cdbc07a7ca02b5a80eb406
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Sep 9 20:34:34 2018 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sun Sep 9 22:00:50 2018 +0200

    cppcheck: fix arrayIndexThenCheck (vcl/salfont)
    
    Change-Id: Ia530a5947ef5b0718c7076367317c661155c6691
    Reviewed-on: https://gerrit.libreoffice.org/60226
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 15a95ee98668..f775a139855b 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -945,7 +945,7 @@ void WinSalGraphics::SetFont(LogicalFontInstance* pFont, int nFallbackLevel)
     else
     {
         // release no longer referenced font handles
-        for( int i = nFallbackLevel + 1; mpWinFontEntry[i].is() && i < MAX_FALLBACK; ++i )
+        for( int i = nFallbackLevel + 1; i < MAX_FALLBACK && mpWinFontEntry[i].is(); ++i )
             mpWinFontEntry[i] = nullptr;
     }
 


More information about the Libreoffice-commits mailing list