diff --git a/ElvUI/Libraries/oUF/ouf.lua b/ElvUI/Libraries/oUF/ouf.lua index 14fcab8..82586ca 100644 --- a/ElvUI/Libraries/oUF/ouf.lua +++ b/ElvUI/Libraries/oUF/ouf.lua @@ -469,8 +469,8 @@ local function generateName(unit, ...) local name = "oUF_" .. gsub(style, gsub("^oUF_?", ""), gsub("[^%a%d_]+", "")) local raid, party, groupFilter - for i = 1, getn(arg), 2 do - local att, val = select(i, unpack(arg)) + for i = 1, arg.n, 2 do + local att, val = arg[i], arg[i+1] if(att == "showRaid") then raid = true elseif(att == "showParty") then @@ -596,8 +596,8 @@ do header.GetAttribute = getAttribute --header:SetAttribute("template", "SecureUnitButtonTemplate") - for i = 1, getn(arg), 2 do - local att, val = select(i, unpack(arg)) + for i = 1, arg.n, 2 do + local att, val = arg[i], arg[i+1] if(not att) then break end header:SetAttribute(att, val) diff --git a/ElvUI/Libraries/oUF/private.lua b/ElvUI/Libraries/oUF/private.lua index 393662f..7dc3a17 100644 --- a/ElvUI/Libraries/oUF/private.lua +++ b/ElvUI/Libraries/oUF/private.lua @@ -5,6 +5,7 @@ function Private.argcheck(value, num, ...) assert(type(num) == 'number', "Bad argument #2 to 'argcheck' (number expected, got " .. type(num) .. ')') for i = 1, arg.n do + -- if(type(value) == arg[i]) then return end if(type(value) == select(i, unpack(arg))) then return end end