proper fix for sort error in FStack update function

This commit is contained in:
Pinya
2017-12-16 20:45:19 +03:00
parent e6acaba732
commit 95c9b3c38c
+3 -6
View File
@@ -3,7 +3,7 @@ local mod = math.mod
local pairs = pairs local pairs = pairs
local tostring = tostring local tostring = tostring
local format, match = string.format, string.match local format, match = string.format, string.match
local getn, tinsert, tsort, twipe = table.getn, table.insert, table.sort, table.wipe local getn, setn, tinsert, tsort, twipe = table.getn, table.setn, table.insert, table.sort, table.wipe
-- WoW API -- WoW API
local GetTime = GetTime local GetTime = GetTime
@@ -86,11 +86,7 @@ local function FrameStackSort(b, a)
return return
end end
if a and b then return a < b
return a < b
else
return
end
end end
function UpdateFrameStack(tooltip, showHidden) function UpdateFrameStack(tooltip, showHidden)
@@ -99,6 +95,7 @@ function UpdateFrameStack(tooltip, showHidden)
for i = 1, getn(frameStackList) do for i = 1, getn(frameStackList) do
frameStackList[i] = nil frameStackList[i] = nil
end end
setn(frameStackList, 0)
for k in pairs(frameStackLevels) do for k in pairs(frameStackLevels) do
frameStackLevels[k] = nil frameStackLevels[k] = nil