From c3ab1aa2f6fa41113631d4e14077ce9454a58ef2 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Sun, 31 Oct 2021 17:16:56 +0100 Subject: [PATCH] fixed avg not returning correctly --- csgo/demo_parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csgo/demo_parser.go b/csgo/demo_parser.go index e4b670f..e7f1ffe 100644 --- a/csgo/demo_parser.go +++ b/csgo/demo_parser.go @@ -82,12 +82,12 @@ func (s *Sprays) Avg() (avg [][]float32) { total int ) - total++ for _, sp := range s.Sprays { for i, r2p := range sp.Spray { if i == 0 { continue } + total++ if len(avg) <= i-1 { avg = append(avg, r2p) } else {