mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 21:43:45 +00:00
fixup! Address missing component error in [modify_ai] (GNA25558)
This commit is contained in:
parent
72f9a4f270
commit
5437c89bc8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user