Skip to content

Fixed bug in linked list where the lastnode wasn't being updated when… #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions femtools/Linked_Lists.F90
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ function ipop_last(list)
deallocate(node)
prev_node%next => null()
list%length = list%length - 1
if (list%length == 0) then
list%lastnode => null()
else
list%lastnode => prev_node
end if
end function ipop_last

function ifetch(list, j)
Expand Down