From d6ee2feb44c468c4e7c28b8e55fe2044fa8b693f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 23 Jun 2011 19:59:07 -0500 Subject: [svn-r21028] Description: Changed the length of the fortran string passed to HD5packFstring in the function nh5pget_external_c. The 3rd argument should be the fortran length of the string, not the C length of the string (which includes the null). Tested: jam (intel and gnu), also checked the example h5ex_d_extern.f90 which detected the problem on Amazon c2 machine (reported by Larry). --- fortran/src/H5Pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 29ba593..cf5eb7d 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -1719,7 +1719,7 @@ nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, * from the function then we need to give HD5packFstring the fortran buffer size so * that it fills the remaining unused characters with blanks. MSB */ - HD5packFstring(c_name, _fcdtocp(name), c_namelen+1); + HD5packFstring(c_name, _fcdtocp(name), c_namelen); ret_value = 0; DONE: -- cgit v0.12