From 478088911b18177b2f37a2ebf275be2ea8406310 Mon Sep 17 00:00:00 2001 From: Nicolai Ommer Date: Wed, 2 Jan 2019 22:19:33 +0100 Subject: [PATCH] [bugfix] Save current and proposed game events correctly in history --- internal/app/controller/state.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/app/controller/state.go b/internal/app/controller/state.go index 9388658e..64e3838f 100644 --- a/internal/app/controller/state.go +++ b/internal/app/controller/state.go @@ -417,9 +417,9 @@ func NewState() (s *State) { func (s State) DeepCopy() (c State) { c = s - c.GameEvents = []*GameEvent{} + c.GameEvents = make([]*GameEvent, len(s.GameEvents)) copy(c.GameEvents, s.GameEvents) - c.GameEventProposals = []*GameEventProposal{} + c.GameEventProposals = make([]*GameEventProposal, len(s.GameEventProposals)) copy(c.GameEventProposals, s.GameEventProposals) if s.PlacementPos != nil { c.PlacementPos = new(Location)