Skip to content

Commit ab99113

Browse files
committed
Warn with correct maxiters in fixpoint_sub
1 parent 9b76f46 commit ab99113

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/variable.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,11 @@ See also: [`fast_substitute`](@ref).
546546
function fixpoint_sub(x, dict; operator = Nothing, maxiters = 1000)
547547
dict = subrules_to_dict(dict)
548548
y = fast_substitute(x, dict; operator)
549-
while !isequal(x, y) && maxiters > 0
549+
iters = maxiters
550+
while !isequal(x, y) && iters > 0
550551
y = x
551552
x = fast_substitute(y, dict; operator)
552-
maxiters -= 1
553+
iters -= 1
553554
end
554555

555556
if !isequal(x, y)

0 commit comments

Comments
 (0)