From 95c9b3c38ca8062e2736ef504a7b62f07e3caed3 Mon Sep 17 00:00:00 2001 From: Pinya <800pin.ru@gmail.com> Date: Sat, 16 Dec 2017 20:45:19 +0300 Subject: [PATCH] proper fix for sort error in FStack update function --- !DebugTools/Compatibility.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/!DebugTools/Compatibility.lua b/!DebugTools/Compatibility.lua index 5f3d0fe..0b3f4ec 100644 --- a/!DebugTools/Compatibility.lua +++ b/!DebugTools/Compatibility.lua @@ -3,7 +3,7 @@ local mod = math.mod local pairs = pairs local tostring = tostring 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 local GetTime = GetTime @@ -86,11 +86,7 @@ local function FrameStackSort(b, a) return end - if a and b then - return a < b - else - return - end + return a < b end function UpdateFrameStack(tooltip, showHidden) @@ -99,6 +95,7 @@ function UpdateFrameStack(tooltip, showHidden) for i = 1, getn(frameStackList) do frameStackList[i] = nil end + setn(frameStackList, 0) for k in pairs(frameStackLevels) do frameStackLevels[k] = nil