Skip to content

Commit c63a282

Browse files
committed
Fix max_length evaluation
1 parent 7eff067 commit c63a282

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fortran/solver/src/guess.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ integer function execute_plan(library, plan) result(max_length)
6363
allocate(mask(library%n_rooms, 0:5), source = .false.)
6464
mask = library%mask
6565
current_room = 0
66+
max_length = 0
6667
do step_id = 1, size(plan%steps)
6768
next_door = plan%steps(step_id)%door_out
6869
next_room_type = plan%steps(step_id)%room_in
@@ -73,7 +74,7 @@ integer function execute_plan(library, plan) result(max_length)
7374
else
7475
exit
7576
end if
76-
max_length = min(step_id, max_length)
77+
max_length = step_id
7778
end do
7879
library%final_mask = library%final_mask .and. mask
7980
end function execute_plan

0 commit comments

Comments
 (0)