diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-09 21:07:10 +0000 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2014-02-10 14:28:53 +0000 |
commit | 0a3cddc4573f3d6d884bef84fed8dbe287e4e6be (patch) | |
tree | ae72636eefcc9c22d09405497b5fb74d9b61fc13 | |
parent | 3b662ee2da7f308189307dd17d3a86aaa5f60d46 (diff) |
coverity#1130443 Improper use of negative value
Change-Id: Ie56b1d5ceeb68bb3d7dffe6ad8949485a93e1fbb
(cherry picked from commit 0419524c57a7c18386c6cdc893a59fd95e589de9)
Reviewed-on: https://gerrit.libreoffice.org/7957
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 21e0cf8da34a..d2754c7c33bd 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1344,7 +1344,7 @@ void AddressMultiLineEdit::SetText( const OUString& rStr ) while(true) { sal_Int32 nStart = sPara.indexOf( '<', nIndex ); - sal_Int32 nEnd = sPara.indexOf( '>', nStart ); + sal_Int32 nEnd = nStart == -1 ? -1 : sPara.indexOf( '>', nStart ); nIndex = nEnd; if(nStart != -1 && nEnd != -1) pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, sal_False ); |