coverity#736092 Improper use of negative value

Change-Id: Ia96ae18275082a5d5f891140b2648d19279f71fa
This commit is contained in:
Caolán McNamara 2014-05-26 10:00:39 +01:00
parent 2096096287
commit a841737381

View File

@ -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);