diff options
Diffstat (limited to 'captain/queryutils.f90')
-rw-r--r-- | captain/queryutils.f90 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/captain/queryutils.f90 b/captain/queryutils.f90 index 6faec80..4f3d805 100644 --- a/captain/queryutils.f90 +++ b/captain/queryutils.f90 @@ -56,20 +56,23 @@ implicit none contains subroutine query_component_parse(self, comptext) + use logging implicit none class(query_component), intent(out)::self character(*), intent(in)::comptext - character(len=:), allocatable::decoded + character(len=:), pointer::decoded integer::i_in, i_out, i_equals, chnum allocate(character(len=len_trim(comptext)) :: decoded) + decoded = " " i_equals = 0 i_out = 1 i_in = 1 do while(i_in <= len_trim(comptext)) + if(comptext(i_in:i_in) /= '%') then decoded(i_out:i_out) = comptext(i_in:i_in) if(comptext(i_in:i_in) == '=') then @@ -207,6 +210,8 @@ contains integer, intent(in)::i character(len=:), pointer::res + res => null() + if(i <= self%component_count()) then res => self%components(i)%value end if @@ -222,6 +227,8 @@ contains integer::i + res => null() + do i = 1, self%component_count() if(self%components(i)%has_key()) then if(self%components(i)%key == trim(k)) then |