From c2553928f2e1063ca8011b0f9b024b819995cab5 Mon Sep 17 00:00:00 2001 From: thetaepsilon-gamedev Date: Sun, 8 Oct 2017 16:20:30 +0100 Subject: [PATCH] new flow logic: flowable_node_registry_install.lua: add set size checking guard --- new_flow_logic/flowable_node_registry_install.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/new_flow_logic/flowable_node_registry_install.lua b/new_flow_logic/flowable_node_registry_install.lua index f019dc3..e4a5744 100644 --- a/new_flow_logic/flowable_node_registry_install.lua +++ b/new_flow_logic/flowable_node_registry_install.lua @@ -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]