diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-11 18:41:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-11 21:05:55 +0100 |
commit | dc5c767882d91a1c42410b86d0e33eaf72ed9a81 (patch) | |
tree | 1fbeb933bf15b76ec6df5917acd1a96af2d462cd /sc | |
parent | 3d7cc977313959d12a0469ee29310b536e377f7c (diff) |
coverity#736092 Improper use of negative value
Change-Id: Idd8d0ea9c6a99cdef8e933b67201208006e92228
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/chgtrack.cxx | 2 |
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); |