check fCount beforehand and bail out early, fdo#70000 related

Change-Id: I47265cf0be9785e8be4b4be0b13d40cda206f349
This commit is contained in:
Eike Rathke
2013-10-18 21:21:14 +02:00
parent 1e49bb2d7f
commit ac0dc48b63

View File

@@ -3850,7 +3850,7 @@ void ScInterpreter::CalculatePearsonCovar( bool _bPearson, bool _bStexy, bool _b
}
}
}
if (fCount < (_bStexy ? 3.0 : 1.0)) // fCount==1 is handled by checking denominator later on
if (fCount < (_bStexy ? 3.0 : (_bSample ? 2.0 : 1.0))) // fCount==1 is handled by checking denominator later on
PushNoValue();
else
{