Skip to content

Commit ecb5e34

Browse files
committed
fix table key name start with number
fix table serialize: table key name start with number
1 parent b87ce06 commit ecb5e34

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

DataTableOptimizer.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,13 @@ local function _SerializeTable( val, name, skipnewlines, campact, depth, tableRe
527527
local nt = type( name )
528528
if nt == "string" then
529529
if name ~= "" then
530-
append( name )
530+
if string.match( name,'^%d+' ) then
531+
append( "[\"" )
532+
append( name )
533+
append( "\"]" )
534+
else
535+
append( name )
536+
end
531537
else
532538
append( "[\"\"]" )
533539
end

0 commit comments

Comments
 (0)