From 1a6b80caeb6d8ceaef2268b1ffa896a3e155de6d Mon Sep 17 00:00:00 2001 From: Davide Bonomini Date: Thu, 9 Nov 2023 12:28:07 +0100 Subject: [PATCH] Fixed Generic Value SizeInBytes for units above the kb --- lib/generic/generic.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/generic/generic.go b/lib/generic/generic.go index d452fb4c..e734ee18 100644 --- a/lib/generic/generic.go +++ b/lib/generic/generic.go @@ -318,13 +318,13 @@ func (v Value) SizeInBytes() uint64 { case "kb": base *= 1024 case "mb": - base *= 1024 * 1024 * 1024 + base *= 1024 * 1024 case "gb": - base *= 1024 * 1024 * 1024 * 1024 + base *= 1024 * 1024 * 1024 case "tb": - base *= 1024 * 1024 * 1024 * 1024 * 1024 + base *= 1024 * 1024 * 1024 * 1024 case "eb": - base *= 1024 * 1024 * 1024 * 1024 * 1024 * 1024 + base *= 1024 * 1024 * 1024 * 1024 * 1024 } return base