sc/source/filter/excel/xestyle.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit a7f9d632bb283955fb79e1e557665759a1b196a7 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Oct 19 10:10:27 2018 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Oct 19 13:32:24 2018 +0200 index validity check looks dubious Change-Id: I0952bbaabeb8353b27b478ad6b17bc9348c6f61a Reviewed-on: https://gerrit.libreoffice.org/61978 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index ddb2d9f8c0ea..d7a621c30150 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -2609,7 +2609,7 @@ sal_uInt16 XclExpXFBuffer::GetXFIndex( sal_uInt32 nXFId ) const sal_Int32 XclExpXFBuffer::GetXmlStyleIndex( sal_uInt32 nXFIndex ) const { OSL_ENSURE( nXFIndex < maStyleIndexes.size(), "XclExpXFBuffer::GetXmlStyleIndex - invalid index!" ); - if( nXFIndex > maStyleIndexes.size() ) + if( nXFIndex >= maStyleIndexes.size() ) return 0; // should be caught/debugged via above assert; return "valid" index. return maStyleIndexes[ nXFIndex ]; } @@ -2617,7 +2617,7 @@ sal_Int32 XclExpXFBuffer::GetXmlStyleIndex( sal_uInt32 nXFIndex ) const sal_Int32 XclExpXFBuffer::GetXmlCellIndex( sal_uInt32 nXFIndex ) const { OSL_ENSURE( nXFIndex < maCellIndexes.size(), "XclExpXFBuffer::GetXmlStyleIndex - invalid index!" ); - if( nXFIndex > maCellIndexes.size() ) + if( nXFIndex >= maCellIndexes.size() ) return 0; // should be caught/debugged via above assert; return "valid" index. return maCellIndexes[ nXFIndex ]; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
