diff --git a/stepmania/Themes/default/Scripts/Serialize.lua b/stepmania/Themes/default/Scripts/Serialize.lua index e9796b5f08..df9c84d534 100644 --- a/stepmania/Themes/default/Scripts/Serialize.lua +++ b/stepmania/Themes/default/Scripts/Serialize.lua @@ -61,6 +61,19 @@ function Serialize(t) return ret end +-- Recursively deep-copy a table. +function DeepCopy(t) + if type(t) ~= "table" then + return t + end + + local ret = {} + for a,b in pairs(t) do + ret[a] = DeepCopy(b) + end + return ret +end + -- (c) 2005 Glenn Maynard -- All rights reserved. --