Small detail changes in configuration
Scott Sibley [08-20-10 - 07:33]
Small detail changes in configuration
diff --git a/Modules/Text.lua b/Modules/Text.lua
index 71f65a2..7208042 100644
--- a/Modules/Text.lua
+++ b/Modules/Text.lua
@@ -310,7 +310,7 @@ end
mem, percent, memdiff, totalMem, totaldiff = GetMemUsage("StarTip")
if mem then
if totaldiff == 0 then totaldiff = 1 end
- self.memperc = memdiff / (totaldiff ~= 0 and totaldiff or 1) * 100
+ self.memperc = memdiff / totaldiff * 100
return memshort(tonumber(format("%.2f", mem))) .. " (" .. format("%.2f", self.memperc) .. "%)"
end
]],
diff --git a/config.lua b/config.lua
index c602b1e..3815de0 100644
--- a/config.lua
+++ b/config.lua
@@ -115,10 +115,11 @@ StarTip.config = {
value = [[
mem, percent, memdiff, totalMem, totaldiff = GetMemUsage("StarTip")
if mem then
- if totaldiff == 0 then totaldiff = 1 end
+ if totaldiff == 0 then totaldiff = 1 end
self.memperc = memdiff / totaldiff * 100
- return memshort(mem) .. " (" .. format("%.2f", self.memperc) .. "%)"
-end]],
+ return memshort(tonumber(format("%.2f", mem))) .. " (" .. format("%.2f", self.memperc) .. "%)"
+end
+]],
cols = 20,
update = 1000,
dontRtrim = true