]> git.lizzy.rs Git - worldedit.git/commitdiff
Fix schematics with extra headers to parse properly
authorsfan5 <sfan5@live.de>
Mon, 9 Sep 2019 18:52:15 +0000 (20:52 +0200)
committersfan5 <sfan5@live.de>
Mon, 9 Sep 2019 18:52:15 +0000 (20:52 +0200)
Currently no schematic format makes use of these, but that
may change so do some future proofing.

worldedit/serialization.lua

index ddc59cd388eb257f64b8aeac61093e359b577610..ae300f8fa488aaf2fe1a16458364656094ae6d78 100644 (file)
@@ -24,7 +24,7 @@ Serialization version history:
 -- @return Extra header fields as a list of strings, or nil if not supported.\r
 -- @return Content (data after header).\r
 function worldedit.read_header(value)\r
-       if value:find("^[0-9]+[%-:]") then\r
+       if value:find("^[0-9]+[,:]") then\r
                local header_end = value:find(":", 1, true)\r
                local header = value:sub(1, header_end - 1):split(",")\r
                local version = tonumber(header[1])\r