From 868b0b3574cb721c07570a3aea8a1d726ac3e715 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Thu, 7 Oct 2021 18:05:06 +1100 Subject: [PATCH] Ensure consistent reporting of MemoryMeter used memory Resolves #821 --- MemoryMeter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MemoryMeter.c b/MemoryMeter.c index 4c6672d8..89e242ca 100644 --- a/MemoryMeter.c +++ b/MemoryMeter.c @@ -36,7 +36,7 @@ static void MemoryMeter_updateValues(Meter* this) { /* Do not print available memory in bar mode */ this->curItems = 4; - written = Meter_humanUnit(buffer, isnan(this->values[4]) ? this->values[0] : this->total - this->values[4], size); + written = Meter_humanUnit(buffer, this->values[0], size); METER_BUFFER_CHECK(buffer, size, written); METER_BUFFER_APPEND_CHR(buffer, size, '/');