util.stanza: Remove numeric attributes while deserializing
authorWaqas Hussain <waqas20@gmail.com>
Thu, 25 Jun 2009 12:19:13 +0000 (17:19 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Thu, 25 Jun 2009 12:19:13 +0000 (17:19 +0500)
util/stanza.lua

index 526bb2f0f5c45e892fbfd886e2e0ee2ff83301fe..4f3875614aa14a02779dab419faff90742a4f9a0 100644 (file)
@@ -200,6 +200,8 @@ end
 function deserialize(stanza)
        -- Set metatable
        if stanza then
+               local attr = stanza.attr;
+               for i=1,#attr do attr[i] = nil; end
                setmetatable(stanza, stanza_mt);
                for _, child in ipairs(stanza) do
                        if type(child) == "table" then