diff options
author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-08 16:20:30 +0100 |
---|---|---|
committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-08 16:20:30 +0100 |
commit | c2553928f2e1063ca8011b0f9b024b819995cab5 (patch) | |
tree | 63a74c44852cf6f803b47cbbd918f73de37a1c84 | |
parent | eaf6c33bae0912e15ac190df203b9b250545052b (diff) | |
download | pipeworks-c2553928f2e1063ca8011b0f9b024b819995cab5.tar pipeworks-c2553928f2e1063ca8011b0f9b024b819995cab5.tar.gz pipeworks-c2553928f2e1063ca8011b0f9b024b819995cab5.tar.bz2 pipeworks-c2553928f2e1063ca8011b0f9b024b819995cab5.tar.xz pipeworks-c2553928f2e1063ca8011b0f9b024b819995cab5.zip |
new flow logic: flowable_node_registry_install.lua: add set size checking guard
-rw-r--r-- | new_flow_logic/flowable_node_registry_install.lua | 3 |
1 files changed, 3 insertions, 0 deletions
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] |