From a84173738175a07429278b9010f1fbcf70aac74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 26 May 2014 10:00:39 +0100 Subject: [PATCH] coverity#736092 Improper use of negative value Change-Id: Ia96ae18275082a5d5f891140b2648d19279f71fa --- sc/source/core/tool/chgtrack.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);