From 69818d33856e5993bb1d0fc1420def57ab1f0bc6 Mon Sep 17 00:00:00 2001 From: Michal Kubec Date: Mon, 31 May 2021 08:00:19 +0200 Subject: [PATCH] Skip empty array --- chia-log-analyzer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chia-log-analyzer.go b/chia-log-analyzer.go index 30ee4a4..79043f4 100644 --- a/chia-log-analyzer.go +++ b/chia-log-analyzer.go @@ -444,6 +444,9 @@ func renderLog(text string) { } func renderOverallHealth() { + if len(healthData) < 3 { + return + } values := sortMap(healthData) values = values[1 : len(values)-1] //remove the first and the last (may be incomplete) sum := sumFloats(values)