mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-12-25 18:20:38 +01:00
Fix schematics with extra headers to parse properly
Currently no schematic format makes use of these, but that may change so do some future proofing.
This commit is contained in:
parent
68f7bcc728
commit
f6298d7b87
@ -24,7 +24,7 @@ Serialization version history:
|
|||||||
-- @return Extra header fields as a list of strings, or nil if not supported.
|
-- @return Extra header fields as a list of strings, or nil if not supported.
|
||||||
-- @return Content (data after header).
|
-- @return Content (data after header).
|
||||||
function worldedit.read_header(value)
|
function worldedit.read_header(value)
|
||||||
if value:find("^[0-9]+[%-:]") then
|
if value:find("^[0-9]+[,:]") then
|
||||||
local header_end = value:find(":", 1, true)
|
local header_end = value:find(":", 1, true)
|
||||||
local header = value:sub(1, header_end - 1):split(",")
|
local header = value:sub(1, header_end - 1):split(",")
|
||||||
local version = tonumber(header[1])
|
local version = tonumber(header[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user