summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index d142cb75..2a7b3773 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -831,7 +831,7 @@ double humanize_size(off_t bytes, const char target_unit, int long_labels,
for(index = 0; index < unitcount - 1; index++) {
if(target_unit != '\0' && shortlabels[index][0] == target_unit) {
break;
- } else if(target_unit == '\0' && val <= 2048.0) {
+ } else if(target_unit == '\0' && val <= 2048.0 && val >= -2048.0) {
break;
}
val /= 1024.0;