svx/source/dialog/srchdlg.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit ae8d4fd4fd049fa020d59bf4c743c4f7d0788d43 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Mar 29 10:14:21 2017 +0100 nCnt calculation is overwritten anyway Change-Id: Idf2693aaf31fc06e16df4b15766d29f029df896a diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 1abd869cff8c..b3fac6fb6413 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1066,16 +1066,14 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, if ( !pImpl->pRanges && pSSet ) { - sal_sSize nCnt = 0; const sal_uInt16* pPtr = pSSet->GetRanges(); const sal_uInt16* pTmp = pPtr; while( *pPtr ) { - nCnt += ( *(pPtr+1) - *pPtr ) + 1; pPtr += 2; } - nCnt = pPtr - pTmp + 1; + sal_sSize nCnt = pPtr - pTmp + 1; pImpl->pRanges.reset( new sal_uInt16[nCnt] ); memcpy( pImpl->pRanges.get(), pTmp, sizeof(sal_uInt16) * nCnt ); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits