From 99ed82e86441abcbc39d04ef7d9c37676dab84a1 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Thu, 7 Dec 2006 03:43:52 +0000 Subject: [PATCH] Fix build orange. Bug 356335, reviews hopefully coming up. --- layout/tables/nsCellMap.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/tables/nsCellMap.cpp b/layout/tables/nsCellMap.cpp index 609f968bb77f..88d676b32885 100644 --- a/layout/tables/nsCellMap.cpp +++ b/layout/tables/nsCellMap.cpp @@ -2044,8 +2044,10 @@ void nsCellMap::ShrinkWithoutCell(nsTableCellMap& aMap, // remove the deleted cell and cellData entries for it for (rowX = aRowIndex; rowX <= endRowIndex; rowX++) { CellDataArray& row = mRows[rowX]; - for (colX = endColIndex; colX >= PRUint32(aColIndex); colX--) { - DestroyCellData(row[colX]); + // Shift things by 1 so the aColIndex == 0 case works right with + // our unsigned int colX. + for (colX = endColIndex + 1; colX > PRUint32(aColIndex); colX--) { + DestroyCellData(row[colX-1]); } row.RemoveElementsAt(aColIndex, endColIndex - aColIndex + 1); }