avoid division by zero and add warning

Original commit message from CVS:
avoid division by zero and add warning
1 file changed