Kaydet (Commit) 08fad277 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#736102 Improper use of negative value

Change-Id: I3f915ff949fa00357599e8cfc59c01c6eb04e9fd
üst 9ca2e0ab
...@@ -809,7 +809,10 @@ bool SmCursor::InsertRow() { ...@@ -809,7 +809,10 @@ bool SmCursor::InsertRow() {
//Find parent and offset in parent //Find parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent(); SmStructureNode *pLineParent = pLine->GetParent();
int nParentIndex = pLineParent->IndexOfSubNode(pLine); int nParentIndex = pLineParent->IndexOfSubNode(pLine);
OSL_ENSURE( nParentIndex != -1, "pLine must be a subnode of pLineParent!");
assert(nParentIndex != -1); //pLine must be a subnode of pLineParent
if (nParentIndex == -1)
return false;
//Discover the context of this command //Discover the context of this command
SmTableNode *pTable = NULL; SmTableNode *pTable = NULL;
......
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