Made rev 4586 safe against division by 0

This commit is contained in:
Thomas Schmitt 2012-01-25 15:37:29 +00:00
parent 48b5db35ab
commit 62962cabea
2 changed files with 3 additions and 2 deletions

View File

@ -2060,7 +2060,8 @@ int Xorriso_pacifier_callback(struct XorrisO *xorriso, char *what_done,
if(since > 0)
speed= count / since;
} else if(count >= xorriso->pacifier_prev_count) {
speed= (count - xorriso->pacifier_prev_count) / (interval_time);
if(interval_time > 0)
speed= (count - xorriso->pacifier_prev_count) / interval_time;
}
}
if(speed >= 0.0) {

View File

@ -1 +1 @@
#define Xorriso_timestamP "2012.01.23.104642"
#define Xorriso_timestamP "2012.01.25.153732"