head	1.1;
access;
symbols
	RELEASE_8_3_0:1.1
	RELEASE_9_0_0:1.1
	RELEASE_7_4_0:1.1
	RELEASE_8_2_0:1.1
	RELEASE_6_EOL:1.1;
locks; strict;
comment	@# @;


1.1
date	2010.07.28.15.23.24;	author arved;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Fix a division by zero bug.
Bump PORTREVISION

PR:		148858
Submitted by:	Artem Naluzhnyy <tut@@nhamon.com.ua>
Approved by:	maintainer
@
text
@--- chaosreader.orig	2010-07-23 11:18:46.000000000 +0300
+++ chaosreader	2010-07-23 11:21:34.000000000 +0300
@@@@ -4028,7 +4028,11 @@@@
 	   ### This causes the replay program to pause
 	   print REPLAY "ms($timediff1);\n";
 	}
-	$speed = sprintf("%.2f",$bytes / (1024 * $duration));
+	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;
@
