From 44961cb326fde3cb681a79eb28becb74a921a29d Mon Sep 17 00:00:00 2001 From: ulim Date: Wed, 7 May 2008 00:06:22 +0200 Subject: fix bug in new kb/s display for transfers of less than one second. --- root_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index 9dfbc998..b3a77a10 100644 --- a/root_commands.c +++ b/root_commands.c @@ -1075,7 +1075,7 @@ static void cmd_transfers( irc_t *irc, char **cmd ) else { int kb_per_s = 0; - time_t diff = time( NULL ) - file->started; + time_t diff = time( NULL ) - file->started ? : 1; if ( ( file->started > 0 ) && ( file->bytes_transferred > 0 ) ) kb_per_s = file->bytes_transferred / 1024 / diff; -- cgit v1.2.3