- restored previous changes; cleanup workspace
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
||||
-- import addon read namespace from global env
|
||||
local _G = _G
|
||||
local _G = _G or getfenv()
|
||||
local Grichelde = _G.Grichelde or {}
|
||||
|
||||
local type, print, pairs, tSize, select, unpack, find, cGray, cDarkgray, cRed, cPrefix, format, rep, toString
|
||||
@@ -93,7 +93,7 @@ function Grichelde:Format(message, ...)
|
||||
--print("...: ", ...)
|
||||
return message, ...
|
||||
else
|
||||
local l = select("#", ...)
|
||||
local l = tSize(...)
|
||||
if (l > 0) then
|
||||
-- sanitize nil values in vararg
|
||||
local packed = { ... }
|
||||
@@ -144,7 +144,7 @@ function Grichelde:LogPrint(printFunc, obj, ...)
|
||||
printF("<nil>")
|
||||
else
|
||||
if type(obj) == "string" then
|
||||
local l = select("#", ...)
|
||||
local l = tSize(...)
|
||||
if (l == 0) or (find(obj, "%%") == nil) then
|
||||
printF(obj, ...)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user