Skip to content

Commit 723ea9c

Browse files
committed
only bookkeep if_count when we are keeping a limit
1 parent acaab77 commit 723ea9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/LaTeXML/Core/Definition/Conditional.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ sub invoke_conditional {
5959
my ($self, $gullet) = @_;
6060
# Keep a stack of the conditionals we are processing.
6161
my $ifid = $STATE->lookupValue('if_count') || 0;
62-
$STATE->assignValue(if_count => ++$ifid, 'global');
62+
$STATE->assignValue(if_count => ++$ifid, 'global') if $LaTeXML::IF_LIMIT;
6363
if ($LaTeXML::IF_LIMIT and $ifid > $LaTeXML::IF_LIMIT) {
6464
Fatal('timeout', 'if_limit', $self,
6565
"Conditional limit of $LaTeXML::IF_LIMIT exceeded, infinite loop?"); }

0 commit comments

Comments
 (0)