mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
add \0 in dumper would be better
This commit is contained in:
@@ -12,7 +12,7 @@ local address
|
|||||||
local unique_id = 0
|
local unique_id = 0
|
||||||
local function unique_string(str)
|
local function unique_string(str)
|
||||||
unique_id = unique_id + 1
|
unique_id = unique_id + 1
|
||||||
return str .. ("\0" .. tostring(unique_id))
|
return str .. tostring(unique_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function monitor(pointer)
|
local function monitor(pointer)
|
||||||
|
|||||||
@@ -124,7 +124,8 @@ function ctd.dump(root)
|
|||||||
string.pack("<I4", doc.table_n),
|
string.pack("<I4", doc.table_n),
|
||||||
table.concat(index),
|
table.concat(index),
|
||||||
table.concat(doc.table),
|
table.concat(doc.table),
|
||||||
table.concat(doc.strings, "\0")
|
table.concat(doc.strings, "\0"),
|
||||||
|
"\0",
|
||||||
}
|
}
|
||||||
return table.concat(tmp)
|
return table.concat(tmp)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user