new flow logic: flowable_node_registry_install.lua: add set size checking guard

This commit is contained in:
thetaepsilon-gamedev 2017-10-08 16:20:30 +01:00
parent eaf6c33bae
commit c2553928f2

View File

@ -147,6 +147,9 @@ local simple_transitions = pipeworks.flowables.transitions.simple
register.transition_simple_set = function(nodeset)
local set = {}
local length = #nodeset
if length < 2 then simpleseterror("nodeset needs at least two elements!") end
for index, element in ipairs(nodeset) do
if type(element) ~= "table" then simpleseterror("element "..tostring(index).." in nodeset was not table!") end
local nodename = element[1]