From 6ec1ea1fe7cfe709e1b86a3d175863140134e0d3 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 22 Apr 2018 14:14:16 +0200 Subject: [PATCH] chat: avoid vararg and unpack in hooks switch to static vars due to previous memleaks because of a weird behaviour of the old lua engine --- modules/chat.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/chat.lua b/modules/chat.lua index fea6e6ca..b4d155eb 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -764,7 +764,7 @@ pfUI:RegisterModule("chat", function () if not _G["ChatFrame"..i].HookAddMessage then _G["ChatFrame"..i].HookAddMessage = _G["ChatFrame"..i].AddMessage end - _G["ChatFrame"..i].AddMessage = function (frame, text, ...) + _G["ChatFrame"..i].AddMessage = function (frame, text, a1, a2, a3, a4, a5) if text then -- detect urls @@ -825,7 +825,7 @@ pfUI:RegisterModule("chat", function () end end - _G["ChatFrame"..i].HookAddMessage(frame, text, unpack(arg)) + _G["ChatFrame"..i].HookAddMessage(frame, text, a1, a2, a3, a4, a5) end end end