about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2023-07-30 13:42:30 +0200
committerLeah Neukirchen <leah@vuxu.org>2023-07-30 13:42:30 +0200
commit4c20ad7d300ebed36819cb00dbbdc917609e0cab (patch)
tree2c8d0f9d2fc898b92f0447e214b403337287201d
parent9923c80d62b339010ba5bbe6c77ef3501b5ce726 (diff)
downloaddosfetch-4c20ad7d300ebed36819cb00dbbdc917609e0cab.tar.gz
dosfetch-4c20ad7d300ebed36819cb00dbbdc917609e0cab.tar.xz
dosfetch-4c20ad7d300ebed36819cb00dbbdc917609e0cab.zip
fix disk usage computation
-rw-r--r--dosfetch.pas4
1 files changed, 2 insertions, 2 deletions
diff --git a/dosfetch.pas b/dosfetch.pas
index 979924d..bad3de3 100644
--- a/dosfetch.pas
+++ b/dosfetch.pas
@@ -84,8 +84,8 @@ begin
    end;
    free := longint(a)*longint(c)*longint(b);
    total := longint(a)*longint(c)*longint(d);
-   write(free div 1024, '/', total div 1024, ' KB (');
-   writeln(round(100-(free/total)*100), '% free)');
+   write(total div 1024 - free div 1024, '/', total div 1024, ' KB (');
+   writeln(round((free/total)*100), '% free)');
 end;
 
 procedure dosver;