fix crash when tube too long (and spurious whitespace changes)

This commit is contained in:
flux 2019-08-29 19:28:44 +00:00
parent d6b0696746
commit 342083bf03

@ -138,6 +138,7 @@ local function get_dest_node(pos, side)
local _,node = Tube:get_node(pos)
local dir = side_to_dir(side, node.param2)
local spos, sdir = Tube:get_connected_node_pos(pos, dir)
if not (spos and sdir) then return end
_,node = Tube:get_node(spos)
local out_side = dir_to_side(tubelib2.Turn180Deg[sdir], node.param2)
return spos, out_side, Name2Name[node.name] or node.name