]> git.tuebingen.mpg.de Git - tfortune.git/commitdiff
com_stats(): Avoid division by zero.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 17 Jun 2019 11:27:36 +0000 (13:27 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 18 Jun 2019 11:37:55 +0000 (13:37 +0200)
If no epigrams are defined yet, the arguments to printf() contain
a division by zero which results in output like:

average number of epigrams per file     -nan
average number of tags per epigram.     -nan
average number of tag recurrence...     -nan

This is not a wrong per se, but it seems to be safer to special case
this and print zero.


No differences found