avoid potenttial out-of-bounds memory access
This commit is contained in:
parent
5c688345ed
commit
c507e2d3b6
|
@ -254,7 +254,11 @@ pure function IO_lc(string)
|
|||
|
||||
do i = 1,len(string)
|
||||
n = index(UPPER,string(i:i))
|
||||
IO_lc(i:i) = merge(string(i:i),LOWER(n:n),n==0)
|
||||
if (n==0) then
|
||||
IO_lc(i:i) = string(i:i)
|
||||
else
|
||||
IO_lc(i:i) = LOWER(n:n)
|
||||
end if
|
||||
end do
|
||||
|
||||
end function IO_lc
|
||||
|
|
Loading…
Reference in New Issue