summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. 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)
commit1dcdcabdcc763d9a9248d7fc269b3bed04597778 (patch)
treefe051be2b09cb40ec8d203f3c8a703e0d4c25fea
parent6bb1483d0be1380164839aa94bc8ac4a37240937 (diff)
substvars: Set max depth
-rw-r--r--lib/substvars.sh4
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