Skip to content

Commit 4780889

Browse files
committed
[bugfix] Save current and proposed game events correctly in history
1 parent b6541a0 commit 4780889

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/app/controller/state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,9 @@ func NewState() (s *State) {
417417

418418
func (s State) DeepCopy() (c State) {
419419
c = s
420-
c.GameEvents = []*GameEvent{}
420+
c.GameEvents = make([]*GameEvent, len(s.GameEvents))
421421
copy(c.GameEvents, s.GameEvents)
422-
c.GameEventProposals = []*GameEventProposal{}
422+
c.GameEventProposals = make([]*GameEventProposal, len(s.GameEventProposals))
423423
copy(c.GameEventProposals, s.GameEventProposals)
424424
if s.PlacementPos != nil {
425425
c.PlacementPos = new(Location)

0 commit comments

Comments
 (0)