ClockEstimate: DivByZero
The clock estimator has a potential division by zero. Using `iteration + 1` seems also more logical to me for an average. Found with coverity in a downstream project.
This commit is contained in:
parent
3ed5441067
commit
d1e7344f16
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ namespace Catch {
|
|||
// is terrible and we should move on.
|
||||
// TBD: How to signal that the measured resolution is probably wrong?
|
||||
if (ticks > startTime + 3 * nanosecondsInSecond) {
|
||||
return sum / i;
|
||||
return sum / ( i + 1u );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue