sc/source/ui/dbgui/filtdlg.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a0ce51def4fc0198d650e223a33e2ad2a2738127
Author:     Bogdan Buzea <buzea.bog...@libreoffice.org>
AuthorDate: Sat Nov 23 13:30:34 2024 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Jun 18 10:47:13 2025 +0200

    tdf#163486: PVS V1028 Possible overflow. Consider casting operands,
    
    not the result.
    
    Change-Id: Ib57ebe7df39d7c0374853fd4ff612d0be882f7fe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177121
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index d5f6f3d090c6..493fdcaa042b 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -670,7 +670,7 @@ void ScFilterDlg::UpdateColorList(size_t nList)
 size_t ScFilterDlg::GetFieldSelPos( SCCOL nField )
 {
     if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 )
-        return static_cast<size_t>(nField - theQueryData.nCol1 + 1);
+        return static_cast<size_t>(nField) - theQueryData.nCol1 + 1;
     else
         return 0;
 }

Reply via email to