summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-26 10:00:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-26 10:18:28 +0100
commita84173738175a07429278b9010f1fbcf70aac74c (patch)
tree33ff79bbf114e5ca4c9822d6eb5d0776cd0636f5
parent2096096287396afa2385add5ba14ead88d21aa88 (diff)
coverity#736092 Improper use of negative value
Change-Id: Ia96ae18275082a5d5f891140b2648d19279f71fa
-rw-r--r--sc/source/core/tool/chgtrack.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index a9ccee7ecadc..067ff74b8c39 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -1485,7 +1485,7 @@ void ScChangeActionContent::GetDescription(
if (aTmpStr.isEmpty())
aTmpStr = ScGlobal::GetRscString( STR_CHANGED_BLANK );
- nPos = aRsc.indexOfAsciiL("#2", 2, nPos);
+ nPos = nPos >= 0 ? aRsc.indexOfAsciiL("#2", 2, nPos) : -1;
if (nPos >= 0)
{
aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);