fix bug in f2c string conversion detected by bound checking

This commit is contained in:
Axel Kohlmeyer
2024-03-18 10:27:38 -04:00
parent dcbb09f321
commit fb10881636

View File

@ -3633,7 +3633,7 @@ CONTAINS
n = LEN_TRIM(f_string)
ptr = lammps_malloc(n+1)
CALL C_F_POINTER(ptr, c_string, [1])
CALL C_F_POINTER(ptr, c_string, [n+1])
DO i=1, n
c_string(i) = f_string(i:i)
END DO