From e391a711db7f20e29eb1172bd1db4b94c09ca518 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Mon, 18 May 2020 19:58:29 -0400 Subject: Fixed appending the last site on back operations, resulting in death of back functionality. --- history.f90 | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'history.f90') diff --git a/history.f90 b/history.f90 index fc178e0..e56cc89 100644 --- a/history.f90 +++ b/history.f90 @@ -40,8 +40,11 @@ contains last_location => null() else last_location => first_location + do while(associated(last_location%next)) + last_location => last_location%next + end do end if @@ -66,15 +69,21 @@ contains else last => last_location(first_location) - allocate(last%next) - last => last%next - last%next => null() - last%url = url + if(trim(last%url) /= trim(url)) then + + allocate(last%next) + last => last%next + last%next => null() + last%url = url + + end if end if head => first_location - + + Print *, "=> "//trim(url) + end function add_location subroutine back_location(first_location, url) -- cgit v1.2.3