diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-09-01 14:38:46 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-09-01 14:38:46 (EDT) |
commit | 1dcdcabdcc763d9a9248d7fc269b3bed04597778 (patch) | |
tree | fe051be2b09cb40ec8d203f3c8a703e0d4c25fea /lib | |
parent | 6bb1483d0be1380164839aa94bc8ac4a37240937 (diff) |
substvars: Set max depth
Diffstat (limited to 'lib')
-rw-r--r-- | lib/substvars.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/substvars.sh b/lib/substvars.sh index 40d908b..78de7e3 100644 --- a/lib/substvars.sh +++ b/lib/substvars.sh @@ -21,6 +21,8 @@ [ "x${_SUBSTVARS_SM+set}" = 'xset' ] && return 0 _SUBSTVARS_SM=1 +substvars_max_depth=50 + set_substvar() { local name="${1}" @@ -83,7 +85,7 @@ substvars() # side of the matched space. depth=0 fi - if [ ${depth} -ge ${_OB_SUBSTVARS_MAX_DEPTH} ]; then + if [ ${depth} -ge ${substvars_max_depth} ]; then # Warn of possible recursion. ob_warn "$(ob_get_msg 'substvar_deep_nesting')" return 1 |