Commit a6a2fb96 authored by Mike Hibler's avatar Mike Hibler
Browse files

Fix divide-by-zero.

parent d8be2b95
......@@ -2549,7 +2549,7 @@ compress_status(int sig)
if (sig == 0) {
fprintf(stderr, "Image size: %llu bytes\n",
(unsigned long long)datawritten);
bps = (bytescompressed * 1000) / ms;
bps = ms ? (bytescompressed * 1000) / ms : 0;
fprintf(stderr, "%.3fMB/second compressed\n",
(double)bps / (1024*1024));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment