From a875772ba642a1f79eb39ac13264adb2ca4d96c9 Mon Sep 17 00:00:00 2001 From: Zaptoss Date: Thu, 20 Jun 2024 12:58:20 +0300 Subject: [PATCH] Fix bag with level accruing, because map can be indexed by for in different order each execution --- internal/config/levels.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config/levels.go b/internal/config/levels.go index 70722ff..3cdd9f4 100644 --- a/internal/config/levels.go +++ b/internal/config/levels.go @@ -52,7 +52,7 @@ func (l Levels) LvlUp(currentLevel int, totalAmount int64) (refCoundToAdd int, n continue } if int64(v.Threshold) > totalAmount { - break + continue } refCoundToAdd += v.Referrals