bug 633453 - correctly check the last array element before deciding whether to append or insert. r=roc a=blocking

This commit is contained in:
Jonathan Kew 2011-02-11 22:07:39 +00:00
parent 1ec2ec1141
commit 91ffef44ac

View File

@ -2128,7 +2128,7 @@ private:
// test for that before falling back to the InsertElementSorted
// method.
if (mOffsetToIndex.Length() == 0 ||
aOffset > mOffsetToIndex[mLastUsed].mOffset) {
aOffset > mOffsetToIndex[mOffsetToIndex.Length() - 1].mOffset) {
if (!mOffsetToIndex.AppendElement(DGRec(aOffset, detailIndex))) {
return nsnull;
}