avoid invalid error access

This commit is contained in:
Martin Diehl 2020-01-29 23:42:50 +01:00
parent c2cdcb17f7
commit d54b8714e1
1 changed files with 5 additions and 1 deletions

View File

@ -407,7 +407,11 @@ pure function IO_lc(string)
do i=1,len(string)
n = index(UPPER,string(i:i))
IO_lc(i:i) = merge(LOWER(n:n),string(i:i),n/=0)
if(n/=0) then
IO_lc(i:i) = LOWER(n:n)
else
IO_lc(i:i) = string(i:i)
endif
enddo
end function IO_lc