Mercurial > wow > breuesk
diff Utility.lua @ 100:790266dbcaff
Cleanup
author | John@Doomsday |
---|---|
date | Thu, 03 May 2012 09:04:21 -0400 |
parents | 619e4b9c3cd9 |
children | 9aa2dcbbdc87 |
line wrap: on
line diff
--- a/Utility.lua Sun Apr 29 15:54:32 2012 -0400 +++ b/Utility.lua Thu May 03 09:04:21 2012 -0400 @@ -22,14 +22,15 @@ end function tcopy(to, from) - for k,v in pairs(from) do - if(type(v)=="table") then - to[k] = {} - tcopy(to[k], v); - else - to[k] = v; + if not from then to = {}; return end + for k,v in pairs(from) do + if(type(v)=="table") then + to[k] = {} + tcopy(to[k], v); + else + to[k] = v; + end end - end end function shallowCopy(t)