summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-20 16:44:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-21 08:54:43 +0000
commit84c4838febc60af47f61795d3ca0884edb39f0e4 (patch)
treeed84dee94cfa7803cf7097dc6248e8dc80a63ec3 /writerfilter
parentee948846df6e880e7b421e0ef36367849ae0004e (diff)
coverity#705442 Improper use of negative value
Change-Id: If039b52c96fd9c902f72c17b13442ddd7f68f13f
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a5c954b05322..aa0896a414ad 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2070,6 +2070,8 @@ OUString lcl_ExctractAskVariableAndHint( const OUString& rCommand, OUString& rHi
// if no hint is set the variable is used as hint
// the quotes of the hint have to be removed
sal_Int32 nIndex = rCommand.indexOf( ' ', 2); //find last space after 'ASK'
+ if (nIndex == -1)
+ return OUString();
while(rCommand[nIndex] == ' ')
++nIndex;
OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK "