Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!uwvax!dogie!rhesus!bin From: bin@rhesus.primate.wisc.edu (Brain in Neutral) Newsgroups: comp.sources.bugs Subject: ARC bomb on zero-length files + fix Message-ID: <342@rhesus.primate.wisc.edu> Date: 18 Jul 88 20:14:00 GMT Organization: UW-Madison Primate Center Lines: 30 ARC bombs after archiving a zero-length file; it tries to print the percentage compression, calculated of course as: compressed-size/original-size or something like that. The result is a floating exception. The patch below fixes it. *** arcpack.c~ Mon Jul 18 14:38:27 1988 --- arcpack.c Mon Jul 18 14:39:45 1988 *************** *** 155,161 /* standard cleanups common to all methods */ if (note) ! printf("done. (%ld%%)\n",100L - (100L*hdr->size)/hdr->length); } /* --- 155,162 ----- /* standard cleanups common to all methods */ if (note) ! printf("done. (%ld%%)\n",hdr->length == 0 ? ! 0L : 100L - (100L*hdr->size)/hdr->length); } /*