From b7a4c9947e47c428429209030faae72274dfb75e Mon Sep 17 00:00:00 2001 From: Foereaper Date: Tue, 20 Jul 2021 00:49:33 +0200 Subject: [PATCH] Increase link count header size --- Client/CMH.lua | 4 ++-- Server/SMH.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Client/CMH.lua b/Client/CMH.lua index 23c8768..8c07de9 100644 --- a/Client/CMH.lua +++ b/Client/CMH.lua @@ -146,7 +146,7 @@ CMHFrame:SetScript("OnEvent", CMH.OnReceive) function CMH.OnREQ(sender, data) debugOut("Processing REQ data") -- split header string into proper variables and ensure the string is the expected format - local functionId, linkCount, reqId, addon = data:match("(%d%d)(%d%d)(%w%w%w%w%w%w)(.+)"); + local functionId, linkCount, reqId, addon = data:match("(%d%d)(%d%d%d)(%w%w%w%w%w%w)(.+)"); if not functionId or not linkCount or not reqId or not addon then debugOut("Malformed REQ data, aborting.") return @@ -277,7 +277,7 @@ end function CMH.SendREQ(functionId, linkCount, reqId, addon) debugOut("Sending REQ with ID: "..reqId) - local send = string.format("%01s%01s%02d%02d%02d%06s%0"..tostring(#addon).."s", CSMHMsgPrefix, "C", pck.REQ, functionId, linkCount, reqId, addon) + local send = string.format("%01s%01s%02d%02d%03d%06s%0"..tostring(#addon).."s", CSMHMsgPrefix, "C", pck.REQ, functionId, linkCount, reqId, addon) SendAddonMessage(send, "", "WHISPER", UnitName("player")) end diff --git a/Server/SMH.lua b/Server/SMH.lua index a396130..f8ca338 100644 --- a/Server/SMH.lua +++ b/Server/SMH.lua @@ -154,7 +154,7 @@ RegisterServerEvent(30, SMH.OnReceive) function SMH.OnREQ(sender, data) debugOut("Processing REQ data") -- split header string into proper variables and ensure the string is the expected format - local functionId, linkCount, reqId, addon = data:match("(%d%d)(%d%d)(%w%w%w%w%w%w)(.+)"); + local functionId, linkCount, reqId, addon = data:match("(%d%d)(%d%d%d)(%w%w%w%w%w%w)(.+)"); if not functionId or not linkCount or not reqId or not addon then debugOut("Malformed REQ data, aborting.") return @@ -288,7 +288,7 @@ end function SMH.SendREQ(sender, functionId, linkCount, reqId, addon) debugOut("Sending REQ with ID: "..reqId) - local send = string.format("%01s%01s%02d%02d%02d%06s%0"..tostring(#addon).."s", CSMHMsgPrefix, "S", pck.REQ, functionId, linkCount, reqId, addon) + local send = string.format("%01s%01s%02d%02d%03d%06s%0"..tostring(#addon).."s", CSMHMsgPrefix, "S", pck.REQ, functionId, linkCount, reqId, addon) sender:SendAddonMessage(send, "", 7, sender) end