Skip to content

Commit

Permalink
we copy
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Oct 4, 2024
1 parent c5a96c6 commit 047f97a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hogvm/python/execute.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from datetime import timedelta
import re
import time
from copy import deepcopy
from typing import Any, Optional, TYPE_CHECKING
from collections.abc import Callable

Expand Down Expand Up @@ -247,7 +248,7 @@ def capture_upvalue(index) -> dict:
case Operation.GET_GLOBAL:
chain = [pop_stack() for _ in range(next_token())]
if globals and chain[0] in globals:
push_stack(get_nested_value(globals, chain, True))
push_stack(deepcopy(get_nested_value(globals, chain, True)))
elif functions and chain[0] in functions:
push_stack(
new_hog_closure(
Expand Down

0 comments on commit 047f97a

Please sign in to comment.