need to check at the beginning
wrong logic in case default was overwritten
This commit is contained in:
parent
92bcf3a7aa
commit
6a75021bca
|
@ -450,6 +450,9 @@ character(len=65536) function getString(this,key,defaultVal,raw)
|
||||||
whole = merge(raw,.false.,present(raw)) ! whole string or white space splitting
|
whole = merge(raw,.false.,present(raw)) ! whole string or white space splitting
|
||||||
found = present(defaultVal)
|
found = present(defaultVal)
|
||||||
if (found) getString = trim(defaultVal)
|
if (found) getString = trim(defaultVal)
|
||||||
|
if (found) then
|
||||||
|
if (len_trim(getString) /= len_trim(defaultVal)) call IO_error(0_pInt,ext_msg='getString')
|
||||||
|
endif
|
||||||
|
|
||||||
item => this%next
|
item => this%next
|
||||||
do while (associated(item))
|
do while (associated(item))
|
||||||
|
@ -467,9 +470,7 @@ character(len=65536) function getString(this,key,defaultVal,raw)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
if (.not. found) call IO_error(140_pInt,ext_msg=key)
|
if (.not. found) call IO_error(140_pInt,ext_msg=key)
|
||||||
if (present(defaultVal)) then
|
|
||||||
if (len_trim(getString) /= len_trim(defaultVal)) call IO_error(0_pInt,ext_msg='getString')
|
|
||||||
endif
|
|
||||||
end function getString
|
end function getString
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue