fixup! Address missing component error in [modify_ai] (GNA25558)

This commit is contained in:
Celtic Minstrel 2017-03-12 20:32:52 -04:00
parent 72f9a4f270
commit 5437c89bc8

View file

@ -742,7 +742,7 @@ function wml_actions.modify_ai(cfg)
if cfg.action == "add" or cfg.action == "change" then
local start = string.find(cfg.path, "[a-z_]+%[[a-z0-9_*]*%]$")
final = start and (string.find(cfg.path, '[', start, true) - 1) or -1
start = (start or string.find(cfg.path, "%.[^.]*$") or 0) + 1
start = start or string.find(cfg.path, "[^.]*$") or 1
local comp_type = string.sub(cfg.path, start, final)
component = helper.get_child(cfg, comp_type)
if component == nil then