Skip to content

Commit

Permalink
Fix bug with loading old .we file formats, thanks to @Sokomine
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Dec 13, 2014
1 parent fb49cc4 commit e4d0071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worldedit/serialization.lua
Expand Up @@ -114,7 +114,7 @@ end
-- @return A node list in the latest format, or nil on failure.
function worldedit.load_schematic(value)
local version, header, content = worldedit.read_header(value)
local nodes
local nodes = {}
if version == 1 or version == 2 then -- Original flat table format
local tables = minetest.deserialize(content)
if not tables then return nil end
Expand Down

1 comment on commit e4d0071

@ShadowNinja
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table should be created in the version 3 code (or the creator should be removed from the v4/v5 code, although that's less preferable). Otherwise it creates a temporary table that is never used.

Please sign in to comment.