decode_attrs str() fix

This commit is contained in:
Cosmin Apreutesei
2015-01-26 11:53:24 +02:00
parent 628fe5aead
commit fe64512e9b
+3 -2
View File
@@ -43,8 +43,9 @@ local function decode_attrs(attrs) --char** {k1,v1,...,NULL}
local t = {}
local i = 0
while true do
if attrs[i] == nil or attrs[i+1] == nil then break end
t[str(attrs[i])] = str(attrs[i+1])
local k, v = str(attrs[i]), str(attrs[i+1])
if not k or not v then break end
t[k] = v
i = i + 2
end
return t