diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-08-11 12:44:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-08-11 16:00:59 +0200 |
commit | b65a0b7fb7edbb15b2c1a534cc753afe4362c143 (patch) | |
tree | cbf1777ad3433edd9e100d8060392695451facc0 /accessibility | |
parent | cid#1242793 make fuzzing tabsize check compile time instead of runtime (diff) | |
download | core-b65a0b7fb7edbb15b2c1a534cc753afe4362c143.tar.gz core-b65a0b7fb7edbb15b2c1a534cc753afe4362c143.zip |
cid#1448422 Division or modulo by zero
Change-Id: Id4bd62b13ed5c797274915f5b1fa44fa3bc46c1c
Reviewed-on: https://gerrit.libreoffice.org/77267
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/inc/extended/accessibletablistboxtable.hxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/accessibility/inc/extended/accessibletablistboxtable.hxx b/accessibility/inc/extended/accessibletablistboxtable.hxx index 68e71f0e83d1..78a679f45393 100644 --- a/accessibility/inc/extended/accessibletablistboxtable.hxx +++ b/accessibility/inc/extended/accessibletablistboxtable.hxx @@ -59,7 +59,13 @@ private: sal_Int32 implGetSelRowCount() const; /** Returns the row index from cell index. */ - sal_Int32 implGetRow( sal_Int32 _nIndex ) const { return _nIndex / implGetColumnCount(); } + sal_Int32 implGetRow( sal_Int32 _nIndex ) const + { + auto nColCount = implGetColumnCount(); + assert(nColCount != 0); + return _nIndex / nColCount; + } + /** Returns the absolute row index of the nSelRow-th selected row. */ sal_Int32 implGetSelRow( sal_Int32 _nSelRow ) const; |