aboutsummaryrefslogtreecommitdiff
path: root/captain/queryutils.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-05-12 13:05:42 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-05-12 13:05:42 -0400
commit9ac19f108c1b69025572bf32e310b332ef098c98 (patch)
treed6499920f2c42d162514f85df6a10526e0b6a24a /captain/queryutils.f90
parent738833d70c8d6cca3bbf9efe0c8dd24ed0395dde (diff)
downloadlevitating-9ac19f108c1b69025572bf32e310b332ef098c98.tar.gz
levitating-9ac19f108c1b69025572bf32e310b332ef098c98.zip
Fixed post query processing caused by sloppiness. Adding a player via the web interface now works.
Diffstat (limited to 'captain/queryutils.f90')
-rw-r--r--captain/queryutils.f907
1 files changed, 5 insertions, 2 deletions
diff --git a/captain/queryutils.f90 b/captain/queryutils.f90
index 5e97023..e59713f 100644
--- a/captain/queryutils.f90
+++ b/captain/queryutils.f90
@@ -66,6 +66,7 @@ contains
if(i_equals == 0) then
allocate(character(len=len_trim(decoded)) :: self%value)
self%value = decoded
+ self%key => null()
else
allocate(character(len=i_equals-1) :: self%key)
self%key = decoded(1:i_equals-1)
@@ -200,8 +201,10 @@ contains
integer::i
do i = 1, self%component_count()
- if(associated(self%components(i)%key) .and. self%components(i)%key == trim(k)) then
- res => get_query_value_from_index(self, i)
+ if(self%components(i)%has_key()) then
+ if(self%components(i)%key == trim(k)) then
+ res => get_query_value_from_index(self, i)
+ end if
end if
end do