Bug 393490. When subsuming an interval, we need to merge its beginning into the current interval as well as its end, because it might start before the current interval. r+sr=dbaron

This commit is contained in:
roc+@cs.cmu.edu 2008-02-21 17:02:52 -08:00
Родитель b4827267a4
Коммит f42c3541eb
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -88,6 +88,7 @@ void nsIntervalSet::IncludeInterval(coord_type aBegin, coord_type aEnd)
Interval *subsumed = newInterval->mNext;
while (subsumed && subsumed->mBegin <= aEnd) {
newInterval->mBegin = PR_MIN(newInterval->mBegin, subsumed->mBegin);
newInterval->mEnd = PR_MAX(newInterval->mEnd, subsumed->mEnd);
newInterval->mNext = subsumed->mNext;
FreeInterval(subsumed);