Kaydet (Commit) 84c4838f authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#705442 Improper use of negative value

Change-Id: If039b52c96fd9c902f72c17b13442ddd7f68f13f
üst ee948846
...@@ -2070,6 +2070,8 @@ OUString lcl_ExctractAskVariableAndHint( const OUString& rCommand, OUString& rHi ...@@ -2070,6 +2070,8 @@ OUString lcl_ExctractAskVariableAndHint( const OUString& rCommand, OUString& rHi
// if no hint is set the variable is used as hint // if no hint is set the variable is used as hint
// the quotes of the hint have to be removed // the quotes of the hint have to be removed
sal_Int32 nIndex = rCommand.indexOf( ' ', 2); //find last space after 'ASK' sal_Int32 nIndex = rCommand.indexOf( ' ', 2); //find last space after 'ASK'
if (nIndex == -1)
return OUString();
while(rCommand[nIndex] == ' ') while(rCommand[nIndex] == ' ')
++nIndex; ++nIndex;
OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK " OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment