aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/api0/serverlist.go
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 05:41:02 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 05:41:02 -0400
commit05b81c4db902bc9f8acea1400d5e0836a78a565a (patch)
tree775f0445bb1c7df526b3cbe9c9962c4f81b65bc9 /pkg/api/api0/serverlist.go
parentbcdb9f7b4daa335df4029b7d546d2c3719fa8142 (diff)
downloadAtlas-05b81c4db902bc9f8acea1400d5e0836a78a565a.tar.gz
Atlas-05b81c4db902bc9f8acea1400d5e0836a78a565a.zip
pkg/api/api0: Fix Server.clone() for ModInfo
Diffstat (limited to 'pkg/api/api0/serverlist.go')
-rw-r--r--pkg/api/api0/serverlist.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/api/api0/serverlist.go b/pkg/api/api0/serverlist.go
index c99dfbc..340b54f 100644
--- a/pkg/api/api0/serverlist.go
+++ b/pkg/api/api0/serverlist.go
@@ -81,6 +81,7 @@ func (s Server) AuthAddr() netip.AddrPort {
// clone returns a deep copy of s.
func (s Server) clone() Server {
m := make([]ServerModInfo, len(s.ModInfo))
+ copy(m, s.ModInfo)
s.ModInfo = m
return s
}