]> git.lizzy.rs Git - worldedit.git/commitdiff
Fix //load with 0 nodes (#177)
authorTalkLounge <talklounge@yahoo.de>
Sat, 15 Jun 2019 14:46:12 +0000 (16:46 +0200)
committersfan5 <sfan5@live.de>
Sat, 15 Jun 2019 14:46:12 +0000 (16:46 +0200)
worldedit/serialization.lua

index 4aef556297c72ee2eb8c08976020cf4eb1385ebe..e796fc1477653a8afa0d64047c0734747e6970a5 100644 (file)
@@ -227,6 +227,7 @@ end
 function worldedit.deserialize(origin_pos, value)\r
        local nodes = load_schematic(value)\r
        if not nodes then return nil end\r
+       if #nodes == 0 then return #nodes end\r
 \r
        local pos1, pos2 = worldedit.allocate_with_nodes(origin_pos, nodes)\r
        worldedit.keep_loaded(pos1, pos2)\r