dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 90e4ea2489918f391953dd3405174ea7a1013ef8
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Aug 29 20:51:12 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Aug 30 12:36:41 2024 +0200

    cid#1606837 silence Overflowed constant
    
    Change-Id: I73b29037344056c8649214d110859bbb705e628e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172636
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index ea92978fd4a6..befb38b6812d 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1506,7 +1506,9 @@ void OSelectionBrowseBox::InsertColumn(const 
OTableFieldDescRef& pEntry, sal_uIn
                 getFields().size());
         }
         else
-            ++_nColumnPosition; // within the list
+        {
+            _nColumnPosition = static_cast<sal_uInt16>(_nColumnPosition + 1); 
// within the list
+        }
         nColumnId = GetColumnId(_nColumnPosition);
         pEntry->SetColumnId( nColumnId );
         getFields()[ _nColumnPosition - 1] = pEntry;

Reply via email to