summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-19 10:10:27 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-10-26 22:02:55 +0200
commita5f229206260fbf8f47827786645c7a1bd048aa2 (patch)
tree3f11bbbe32021913f45d41b6810091ad365ef4cb /sc
parent6ce730c54dd5cfebd25d0e2ae3ac07fad4586e57 (diff)
index validity check looks dubious
Change-Id: I0952bbaabeb8353b27b478ad6b17bc9348c6f61a Reviewed-on: https://gerrit.libreoffice.org/61992 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xestyle.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index b9986f338e48..bdf1e853a51d 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -2600,7 +2600,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 ];
}
@@ -2608,7 +2608,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 ];
}