Bug 461239. Be a bit more careful with unsigned arithmetic. r+sr=bzbarsky

This commit is contained in:
Mats Palmgren 2008-10-29 13:40:04 -07:00
parent 03e0cb54e4
commit 0143eb7353

View File

@ -1047,7 +1047,7 @@ RuleProcessorData::GetNthIndex(PRBool aIsOfType, PRBool aIsFromEnd,
nsIContent * const * stopPtr;
if (aIsFromEnd) {
stopPtr = curChildPtr - 1;
curChildPtr += childCount - 1;
curChildPtr = stopPtr + childCount;
increment = -1;
} else {
increment = 1;