Kaydet (Commit) 4e96b278 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#91637 avoid -1 string index

Change-Id: I006040f4589065141310fe2a89b8d2ba3e54ad2c
üst 4cc2fb2d
...@@ -746,8 +746,11 @@ bool SwSeqFieldList::SeekEntry( const _SeqFieldLstElem& rNew, size_t* pP ) const ...@@ -746,8 +746,11 @@ bool SwSeqFieldList::SeekEntry( const _SeqFieldLstElem& rNew, size_t* pP ) const
sal_Int32 nNum1 = sNum1.toInt32(); sal_Int32 nNum1 = sNum1.toInt32();
nCmp = nNum2 - nNum1; nCmp = nNum2 - nNum1;
if( 0 == nCmp ) if( 0 == nCmp )
nCmp = rCaseColl.compareString( rTmp2.copy( nFndPos2 ), {
rTmp1.copy( nFndPos1 )); OUString aTmp1 = nFndPos1 != -1 ? rTmp1.copy(nFndPos1) : OUString();
OUString aTmp2 = nFndPos2 != -1 ? rTmp2.copy(nFndPos2) : OUString();
nCmp = rCaseColl.compareString(aTmp2, aTmp1);
}
} }
else else
nCmp = rColl.compareString( rTmp2, rTmp1 ); nCmp = rColl.compareString( rTmp2, rTmp1 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment