Skip to content

Commit

Permalink
Use LEN() rather than LEN_TRIM() to determine buffer length (prevents…
Browse files Browse the repository at this point in the history
… problems if the passed buffer is freshly allocated or contains trailing whitespace).
  • Loading branch information
jhaiduce committed Jul 7, 2021
1 parent 4aa4036 commit e28f000
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fortran/src/H5Fff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) &
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf
END FUNCTION h5fget_name_c
END INTERFACE
buflen = LEN_TRIM(buf)
buflen = LEN(buf)
hdferr = h5fget_name_c(obj_id, size, buf, buflen)
END SUBROUTINE h5fget_name_f
!****s* H5F/h5fget_filesize_f
Expand Down

0 comments on commit e28f000

Please sign in to comment.