aboutsummaryrefslogtreecommitdiffstats
path: root/util/stanza.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-04-01 19:12:08 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-04-01 19:12:08 +0500
commitbc55b5ad8f2dfd3f6d22905900ea009fc19fcda5 (patch)
tree85055a7e7d7ee3f52dd730714d985f206e729713 /util/stanza.lua
parenta015c6a04858224b509bfbf430b93aaca10fc278 (diff)
downloadprosody-bc55b5ad8f2dfd3f6d22905900ea009fc19fcda5.tar.gz
prosody-bc55b5ad8f2dfd3f6d22905900ea009fc19fcda5.zip
util.stanza: Fixed some more nil global accesses.
Diffstat (limited to 'util/stanza.lua')
-rw-r--r--util/stanza.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/stanza.lua b/util/stanza.lua
index b039993f..a457e619 100644
--- a/util/stanza.lua
+++ b/util/stanza.lua
@@ -225,14 +225,14 @@ function deserialize(stanza)
for i=1,#attr do attr[i] = nil; end
local attrx = {};
for att in pairs(attr) do
- if s_find(att, "|", 1, true) and not s_find(k, "\1", 1, true) then
- local ns,na = s_match(k, "^([^|]+)|(.+)$");
+ if s_find(att, "|", 1, true) and not s_find(att, "\1", 1, true) then
+ local ns,na = s_match(att, "^([^|]+)|(.+)$");
attrx[ns.."\1"..na] = attr[att];
attr[att] = nil;
end
end
for a,v in pairs(attrx) do
- attr[x] = v;
+ attr[a] = v;
end
setmetatable(stanza, stanza_mt);
for _, child in ipairs(stanza) do