18 lines
639 B
Diff
18 lines
639 B
Diff
--- chaosreader 2011-11-10 19:17:50.000000000 +0100
|
|
+++ chaosreader-0.94 2012-03-09 18:15:21.096105305 +0100
|
|
@@ -4028,7 +4024,14 @@
|
|
### This causes the replay program to pause
|
|
print REPLAY "ms($timediff1);\n";
|
|
}
|
|
- $speed = sprintf("%.2f",$bytes / (1024 * $duration));
|
|
+ # avoid division by zero
|
|
+ # from http://sourceforge.net/tracker/?func=detail&aid=2210488&group_id=107384&atid=647489
|
|
+ if ( $duration > 0 ) {
|
|
+ $speed = sprintf("%.2f",$bytes / (1024 * $duration));
|
|
+ }
|
|
+ else {
|
|
+ $speed = "unknown";
|
|
+ }
|
|
print REPLAY "print \"\n\n" .
|
|
"Summary: $duration2 seconds, $bytes bytes, $speed Kb/sec\\n\";";
|
|
close REPLAY;
|