fix: 修复升级lua5.5后的兼容性错误 (#2123)

This commit is contained in:
bitcat🐱
2025-12-24 19:50:38 +08:00
committed by GitHub
parent 9f7634d477
commit a4c6e04ab0
6 changed files with 33 additions and 31 deletions

View File

@@ -102,9 +102,9 @@ local function loadconfig(tmp)
local reload = {}
for name,address in pairs(tmp) do
if name:sub(1,2) == "__" then
name = name:sub(3)
config[name] = address
skynet.error(string.format("Config %s = %s", name, address))
local opt = name:sub(3)
config[opt] = address
skynet.error(string.format("Config %s = %s", opt, address))
else
assert(address == false or type(address) == "string")
if node_address[name] ~= address then