Kaydet (Commit) 70ba0a8d authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#736101 Improper use of negative value

Change-Id: I6fec141e19de921128365da7cbd17e0a0bc0b9a9
üst 08fad277
...@@ -263,7 +263,9 @@ void SmCursor::Delete(){ ...@@ -263,7 +263,9 @@ void SmCursor::Delete(){
SmStructureNode* pLineParent = pLine->GetParent(); SmStructureNode* pLineParent = pLine->GetParent();
//Find line offset in parent //Find line offset in parent
int nLineOffset = pLineParent->IndexOfSubNode(pLine); int nLineOffset = pLineParent->IndexOfSubNode(pLine);
OSL_ENSURE(nLineOffset != -1, "pLine must be a child of its parent!"); assert(nLineOffset != -1); //pLine must be a child of its parent!
if (nLineOffset == -1)
return;
//Position after delete //Position after delete
SmCaretPos PosAfterDelete; SmCaretPos PosAfterDelete;
......
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