зеркало из https://github.com/mozilla/pjs.git
OS/2 crash prevention, make sure that a division by zero can not occure, bug 221975, r/sr=bzbarsky
This commit is contained in:
Родитель
fca1a4fa2c
Коммит
c7db39de02
|
@ -490,6 +490,10 @@ void BasicTableLayoutStrategy::AllocateUnconstrained(PRInt32 aAllocAmount,
|
|||
numColsAllocated++;
|
||||
}
|
||||
}
|
||||
if (!numColsAllocated) {
|
||||
// redistribute the space to all columns and prevent a division by zero
|
||||
numColsAllocated = numCols;
|
||||
}
|
||||
for (colX = 0; colX < numCols; colX++) {
|
||||
if (FINISHED != aAllocTypes[colX]) {
|
||||
if (aExclude0Pro) {
|
||||
|
|
|
@ -490,6 +490,10 @@ void BasicTableLayoutStrategy::AllocateUnconstrained(PRInt32 aAllocAmount,
|
|||
numColsAllocated++;
|
||||
}
|
||||
}
|
||||
if (!numColsAllocated) {
|
||||
// redistribute the space to all columns and prevent a division by zero
|
||||
numColsAllocated = numCols;
|
||||
}
|
||||
for (colX = 0; colX < numCols; colX++) {
|
||||
if (FINISHED != aAllocTypes[colX]) {
|
||||
if (aExclude0Pro) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче