[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source
Caolán McNamara
caolanm at redhat.com
Mon Feb 10 06:29:23 PST 2014
sw/source/ui/dbui/mmaddressblockpage.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 0a3cddc4573f3d6d884bef84fed8dbe287e4e6be
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Feb 9 21:07:10 2014 +0000
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 at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 21e0cf8..d2754c7 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 );
More information about the Libreoffice-commits
mailing list