Skip to content

Commit

Permalink
another fixup 6de1c94
Browse files Browse the repository at this point in the history
Missed a usage of the potentially-nil value
  • Loading branch information
CelticMinstrel committed Mar 10, 2017
1 parent 23662cb commit 6fe8e65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions data/lua/wml-tags.lua
Expand Up @@ -742,6 +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 1
local comp_type = string.sub(cfg.path, start, final)
component = helper.get_child(cfg, comp_type)
if component == nil then
Expand Down

0 comments on commit 6fe8e65

Please sign in to comment.