From 5efeca4a9626fe8321630b1283e90cbb47d7511c Mon Sep 17 00:00:00 2001 From: Foereaper Date: Wed, 4 Jan 2023 00:02:09 +0100 Subject: [PATCH] Fix issue with Lua 5.2 --- 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 263cfb5..2088828 100644 --- a/Client/CMH.lua +++ b/Client/CMH.lua @@ -51,7 +51,7 @@ local function ParseMessage(str) local varType = typeTemp[k] if(varType == 2) then -- Strings -- Special case for empty string parsing - if(v == "") then + if(v == string.char(tonumber('1A', 16))) then v = "" end elseif(varType == 3) then -- Ints @@ -79,7 +79,7 @@ local function ProcessVariables(reqId, ...) if(type(v) == "string") then -- Special case for empty string parsing if(#v == 0) then - v = "" + v = string.char(tonumber('1A', 16)) end msg = msg .. delim[2] elseif(type(v) == "number") then diff --git a/Server/SMH.lua b/Server/SMH.lua index fd397b4..00a777a 100644 --- a/Server/SMH.lua +++ b/Server/SMH.lua @@ -53,7 +53,7 @@ local function ParseMessage(str) local varType = typeTemp[k] if(varType == 2) then -- strings -- special case for empty string parsing - if(v == "") then + if(v == string.char(tonumber('1A', 16))) then v = "" end elseif(varType == 3) then -- Ints @@ -81,7 +81,7 @@ local function ProcessVariables(sender, reqId, ...) if(type(v) == "string") then -- Special case for empty string parsing if(#v == 0) then - v = "" + v = string.char(tonumber('1A', 16)) end msg = msg .. delim[2] elseif(type(v) == "number") then