martijnvanbrummelen / nwipe

nwipe secure disk eraser
GNU General Public License v2.0
688 stars 79 forks source link

HPA_DCO_009 Continuation of HPA/DCO integration. #461

Closed PartialVolume closed 1 year ago

PartialVolume commented 1 year ago

Changed the way percentage is calculated in the PDF report for bytes erased. As we are dealing with large numbers and for some reason printf prints a double that is 99.99999999999 as 100.00 when a precision of two is specified I wrote a function that creates a percentage string such that 99.99999999999 is displayed as 99.99%. This is important in the report as a disc with one hidden sector will now correctly show as 99.99% erased and not 100.00% erased.