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=21b1867de4915b3b8b0db2a3aa7debd3fe530fd4;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/blootbot@365 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/IRC/Schedulers.pl b/src/IRC/Schedulers.pl index e6ae976..a25714c 100644 --- a/src/IRC/Schedulers.pl +++ b/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"),