From 1dcdcabdcc763d9a9248d7fc269b3bed04597778 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 01 Sep 2014 14:38:46 -0400 Subject: substvars: Set max depth --- (limited to 'lib/substvars.sh') 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 -- cgit v0.9.1