sw/source/core/docnode/ndtbl.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 10f3e7f602e68f83f851f4c5179cfd4c40d1c09e
Author:     Aron Budea <aron.bu...@collabora.com>
AuthorDate: Sat Nov 23 02:38:29 2024 +1030
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Sat Nov 23 06:39:52 2024 +0100

    tdf#163486: PVS V1028 Possible overflow. Consider casting operands,
    
    ...not the result.
    
    Change-Id: I4ba8afa5989aea906000bb9c4059855015055002
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177042
    Tested-by: Jenkins
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>

diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 8909fe540c32..39608e359739 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -355,7 +355,7 @@ const SwTable* SwDoc::InsertTable( const 
SwInsertTableOptions& rInsTableOpts,
 
         // If the ColumnArray has a wrong count, ignore it!
         if( pColArr &&
-            static_cast<size_t>(nCols + ( text::HoriOrientation::NONE == 
eAdjust ? 2 : 1 )) != pColArr->size() )
+            static_cast<size_t>(nCols) + ( text::HoriOrientation::NONE == 
eAdjust ? 2 : 1 ) != pColArr->size() )
             pColArr = nullptr;
     }
 

Reply via email to