]> Pileus Git - ~andy/rhawk/commitdiff
Delete original array in acopy
authorAndy Spencer <andy753421@gmail.com>
Sun, 5 Jan 2014 20:34:24 +0000 (20:34 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sun, 5 Jan 2014 20:34:52 +0000 (20:34 +0000)
spades.awk

index ea1040124b3657065839ccb8c0e88585472d31e8..1d0e9d41f12c0e9594e372f14bda450873a43a37 100644 (file)
@@ -61,9 +61,11 @@ function sp_reset(type)
 
 function sp_acopy(dst, src,    key)
 {
-       if (isarray(src))
+       if (isarray(src)) {
+               delete(dst)
                for (key in src)
                        json_copy(dst, key, src[key])
+       }
 }
 
 function sp_save(file, game)