Skip to content

Commit 839b0d9

Browse files
authored
Fix the colour type
1 parent 44a7786 commit 839b0d9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sh_messagepack.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ local ldexp = math.ldexp
2626
local huge = math.huge
2727
local tconcat = table.concat
2828

29+
local oldType = type
30+
local isColor = IsColor
31+
local function type(var)
32+
if isColor(var) then return "Color" end
33+
return oldType(var)
34+
end
35+
2936
local function argerror(caller, narg, extramsg)
3037
error("bad argument #" .. tostring(narg) .. " to " .. caller .. " (" .. extramsg .. ")")
3138
end

0 commit comments

Comments
 (0)