1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-14 19:59:48 +00:00

Merge pull request #228 from botantony/lua-5.5-patch

fix: don't reassign for-loop variable
This commit is contained in:
Linwei
2025-12-24 17:47:50 +08:00
committed by GitHub

3
z.lua
View File

@@ -235,7 +235,8 @@ end
function dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
for key,v in pairs(o) do
local k = key
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. dump(v) .. ','
end