Skip to content

Commit 3540b47

Browse files
committed
Allow game state to support built-ins like tuples.
1 parent 42f7b7f commit 3540b47

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sc2reader/plugins/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ def __getitem__(self, frame):
5353
state = self[prev_frame]
5454
else:
5555
# Copy the previous state and use it as our basis here
56-
state = self[prev_frame].copy()
56+
state = self[prev_frame]
57+
if hasattr(state, 'copy'):
58+
state = state.copy()
5759

5860
self[frame] = state
5961
return state

0 commit comments

Comments
 (0)