Adjust index, not aIndex, to account for the hole caused by removing an already-present item. r=brettw.

git-svn-id: svn://10.0.0.236/trunk@186126 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com 2005-12-15 21:00:59 +00:00
parent 8e7ccad57f
commit cc989f0be0

View File

@ -532,8 +532,8 @@ nsNavBookmarks::InsertItem(PRInt64 aFolder, nsIURI *aItem, PRInt32 aIndex)
NS_ENSURE_SUCCESS(rv, rv);
// since we just removed the item, everything after it shifts back by one
if (aIndex > previousIndex)
aIndex --;
if (index > previousIndex)
index --;
}
rv = AdjustIndices(aFolder, index, PR_INT32_MAX, 1);