all variable expansions.
+Fri May 24 21:49:52 CDT 2002 Adam Heath <doogie@debian.org>
+
+ * scripts/controllib.pl: Properly count recursive expansion of variables,
+ instead of just counting all variable expansions.
+
Fri May 24 21:20:04 CDT 2002 Adam Heath <doogie@debian.org>
* scripts/cl-debian.pl: Recognize emergency as valid in changelogs.
Closes: Bug#140441.
* cl-debian.pl now recognizes emergency as valid in changelogs.
Closes: Bug#138013.
+ * Properly count recursive expansion of variables, instead of just
+ counting all variable expansions. Closes: #144121.
-- Wichert Akkerman <wakkerma@debian.org> Mon, 20 Aug 2001 14:54:38 +0200
my ($lhs,$vn,$rhs,$count);
$count=0;
while ($v =~ m/\$\{([-:0-9a-z]+)\}/i) {
+ # If we have consumed more from the leftover data, then
+ # reset the recursive counter.
+ $count= 0 if (length($') < length($rhs));
+
$count < $maxsubsts ||
&error("too many substitutions - recursive ? - in \`$v'");
$lhs=$`; $vn=$1; $rhs=$';