aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-05-18 19:58:29 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-05-18 19:58:29 -0400
commite391a711db7f20e29eb1172bd1db4b94c09ca518 (patch)
tree44ca0697f493a67b9b5a5eefe32d444e6dbc53c8
parentf9cba5c7cced30edfef7ce0888374e44ef04d79d (diff)
downloadLR-87-e391a711db7f20e29eb1172bd1db4b94c09ca518.tar.gz
LR-87-e391a711db7f20e29eb1172bd1db4b94c09ca518.zip
Fixed appending the last site on back operations, resulting in death of back functionality.
-rw-r--r--history.f9019
1 files changed, 14 insertions, 5 deletions
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)