Skip to content

Commit

Permalink
Fixes bug in snap_deep_copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
JujuAdams committed Jun 24, 2020
1 parent aeee49e commit 25d59aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/snap_deep_copy/snap_deep_copy.gml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
///
/// @param struct/array The struct/array to be copied
///
/// @jujuadams 2020-06-16
/// @jujuadams 2020-06-24

function snap_deep_copy(_value)
{
Expand All @@ -28,11 +28,11 @@ function __snap_deep_copy(_value) constructor

if (is_struct(_value))
{
_value = copy_struct(_source);
_value = copy_struct(_value);
}
else if (is_array(_value))
{
_value = copy_array(_source);
_value = copy_array(_value);
}

variable_struct_set(_copy, _name, _value);
Expand All @@ -57,11 +57,11 @@ function __snap_deep_copy(_value) constructor

if (is_struct(_value))
{
_value = copy_struct(_source);
_value = copy_struct(_value);
}
else if (is_array(_value))
{
_value = copy_array(_source);
_value = copy_array(_value);
}

_copy[@ _i] = _value;
Expand Down

0 comments on commit 25d59aa

Please sign in to comment.