# HG changeset patch # User Kim Alvefur # Date 1592934055 -7200 # Node ID 78f1de5301fc36b8c55e4b41da40c70b14190752 # Parent 64b7daa6c42cd737a4838c23954cfd1900f92c38 mod_adhoc_dataforms_demo: Fix duplicate field prevention It's supposed to only include each type of form field once per form at most but it didn't note which fields it had added already. No idea what the probability was anyways, probably pretty low. diff -r 64b7daa6c42c -r 78f1de5301fc mod_adhoc_dataforms_demo/mod_adhoc_dataforms_demo.lua --- a/mod_adhoc_dataforms_demo/mod_adhoc_dataforms_demo.lua Mon Jun 22 21:35:57 2020 +0200 +++ b/mod_adhoc_dataforms_demo/mod_adhoc_dataforms_demo.lua Tue Jun 23 19:40:55 2020 +0200 @@ -154,6 +154,7 @@ repeat random = math.random(2, #form); until not already_selected[random] + already_selected[random] = true; table.insert(current_form, form[random]); end state.forms[state.step] = dataforms.new(current_form);