From 49fb53d9673145d7fe8a3098430e910c29b40e3a Mon Sep 17 00:00:00 2001
From: Balthazar Wilson <wilsonba@etu.utc.fr>
Date: Sun, 5 Nov 2023 18:50:49 +0100
Subject: [PATCH] fix options

---
 agt/voteragent/voteragent.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/agt/voteragent/voteragent.go b/agt/voteragent/voteragent.go
index 3395f68..fb8e8b9 100644
--- a/agt/voteragent/voteragent.go
+++ b/agt/voteragent/voteragent.go
@@ -64,7 +64,9 @@ func (rca *RestClientAgent) Start() {
 		}
 	}
 
-	rca.options = []int{1 + rand.Intn(rca.nbAlts-1)}
+	if len(rca.options) == 0 {
+		rca.options = []int{1 + rand.Intn(rca.nbAlts-1)}
+	}
 
 	err := rca.vote()
 
-- 
GitLab