diff options
author | ulim <a.sporto+bee@gmail.com> | 2008-05-07 00:06:22 +0200 |
---|---|---|
committer | ulim <a.sporto+bee@gmail.com> | 2008-05-07 00:06:22 +0200 |
commit | 44961cb326fde3cb681a79eb28becb74a921a29d (patch) | |
tree | 3077498dbfd5f36310abd537c27af331511b76a0 /root_commands.c | |
parent | d56ee38d444fb9a4bc0fbf7f699eaf675e019591 (diff) |
fix bug in new kb/s display for transfers of less than one second.
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |