aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'root_commands.c')
-rw-r--r--root_commands.c2
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;