From 86344eb0f4d6e2ea58ce700ab37cc6d3c15f688d Mon Sep 17 00:00:00 2001 From: "lalafi@cyberarmor.io" Date: Tue, 9 Nov 2021 16:17:45 +0200 Subject: [PATCH] score was reverted to safety score --- reporthandling/datastructuresmethodshelper.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/reporthandling/datastructuresmethodshelper.go b/reporthandling/datastructuresmethodshelper.go index 6199a0b7..2141b741 100644 --- a/reporthandling/datastructuresmethodshelper.go +++ b/reporthandling/datastructuresmethodshelper.go @@ -38,10 +38,9 @@ func RemoveResponse(slice []RuleResponse, index int) []RuleResponse { func percentage(big, small int) int { if big == 0 { if small == 0 { - return 0 + return 100 } - return 100 + return 0 } - - return int((float64(small) * 100) / float64(big)) + return int(float64(float64(big-small)/float64(big)) * 100) }