# HG changeset patch # User Waqas Hussain # Date 1267473054 -18000 # Node ID 7941617b15f93c1cbc56e1bb3c920776423618a4 # Parent 65ad0fdb17ba6d6ae1e72b3d20c08c2cb22ceae9 util.stanza: Fixed nil global accesses. diff -r 65ad0fdb17ba -r 7941617b15f9 util/stanza.lua --- a/util/stanza.lua Mon Mar 01 18:52:47 2010 +0000 +++ b/util/stanza.lua Tue Mar 02 00:50:54 2010 +0500 @@ -247,14 +247,14 @@ 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