Fix the sorting of higher button options
James Whitehead II [11-14-09 - 18:04]
Fix the sorting of higher button options
diff --git a/CliqueOptions.lua b/CliqueOptions.lua
index 561feb9..f86e827 100644
--- a/CliqueOptions.lua
+++ b/CliqueOptions.lua
@@ -1044,13 +1044,13 @@ function Clique:ListScrollUpdate()
end
local sortFunc = function(a,b)
- local numA = a.button
- local numB = b.button
+ local numA = tonumber(a.button) or 0
+ local numB = tonumber(b.button) or 0
if numA == numB then
return a.modifier < b.modifier
else
- return tostring(numA) < tostring(numB)
+ return numA < numB
end
end