Commit 3a604563 authored by Tim Wickberg's avatar Tim Wickberg
Browse files

Compression may be negative, fix calculation to display correct value.

Dividing a negative int by a positive can have unexpected behavior -
C99 requires "truncation towards zero". This was to an incorrect output
of:

sbcast: File compressed from 104857600 to 104889678 (40 percent) in 2160081 usec

when testing with a file of random data. This is actually negative 0
(point something that was truncated) compression, not "40".
parent 7bb03489
Supports Markdown
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