From: dms Date: Thu, 8 Feb 2001 15:51:19 +0000 (+0000) Subject: divide by zero fix. thought I fixed it 2 weeks ago X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a5bd29316ab84d5e4b2cb98b055de911c1c42ac5;p=infobot.git divide by zero fix. thought I fixed it 2 weeks ago git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@365 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/IRC/Schedulers.pl b/blootbot/src/IRC/Schedulers.pl index e6ae976..a25714c 100644 --- a/blootbot/src/IRC/Schedulers.pl +++ b/blootbot/src/IRC/Schedulers.pl @@ -456,7 +456,7 @@ sub seenFlush { &status("Flushed $flushed seen entries.") if ($flushed); &VERB(sprintf(" new seen: %03.01f%% (%d/%d)", - $stats{'new'}*100/$stats{'count_old'}, + $stats{'new'}*100/($stats{'count_old'} || 1), $stats{'new'}, $stats{'count_old'} ), 2) if ($stats{'new'}); &VERB(sprintf(" now seen: %3.1f%% (%d/%d)", $stats{'old'}*100/&countKeys("seen"),