fix bug in f2c string conversion detected by bound checking
This commit is contained in:
@ -3687,7 +3687,7 @@ CONTAINS
|
|||||||
|
|
||||||
n = LEN_TRIM(f_string)
|
n = LEN_TRIM(f_string)
|
||||||
ptr = lammps_malloc(n+1)
|
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
|
DO i=1, n
|
||||||
c_string(i) = f_string(i:i)
|
c_string(i) = f_string(i:i)
|
||||||
END DO
|
END DO
|
||||||
|
|||||||
Reference in New Issue
Block a user