summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-05-11 18:41:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-05-11 21:05:55 +0100
commitdc5c767882d91a1c42410b86d0e33eaf72ed9a81 (patch)
tree1fbeb933bf15b76ec6df5917acd1a96af2d462cd /sc
parent3d7cc977313959d12a0469ee29310b536e377f7c (diff)
coverity#736092 Improper use of negative value
Change-Id: Idd8d0ea9c6a99cdef8e933b67201208006e92228
Diffstat (limited to 'sc')
-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 d6b57d783383..a9ccee7ecadc 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -1496,7 +1496,7 @@ void ScChangeActionContent::GetDescription(
if (aTmpStr.isEmpty())
aTmpStr = ScGlobal::GetRscString( STR_CHANGED_BLANK );
- nPos = aRsc.indexOfAsciiL("#3", 2, nPos);
+ nPos = nPos >= 0 ? aRsc.indexOfAsciiL("#3", 2, nPos) : -1;
if (nPos >= 0)
{
aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);