Mercurial > wow > breuesk
changeset 100:790266dbcaff
Cleanup
author | John@Doomsday |
---|---|
date | Thu, 03 May 2012 09:04:21 -0400 |
parents | 5914125bb4ea |
children | 25c127c4c1e8 |
files | Utility.lua |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
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)