From 29bbbcbd9c88c94f2769883913d2f08123a06d3d Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 14 Mar 2000 09:18:52 -0500 Subject: [svn-r2032] Purpose: Bug Fix. Description: Tests failed if drivers multi or split is used (split is implemented as a special case of multi). When a file created via those two drivers is opened again, the file sizes retrieved are incorrect. These seemed to happen to non-little-endian machines only (sun, sgi failed, but linux succeed.) Solution: The error was because the superblock encoding code was keeping track in nseen the pairs of HADDR needed to be converted but did not tell the H5Tconvert 2*nseen to convert. Thus only the first half of the addresses were converted, the rest were left alone. Corrected the numbers of addresses to convert. Platforms tested: IRIX64, Solaris 2.7, Linux. --- src/H5FDmulti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index ace79ee..276db2c 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -715,7 +715,7 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/, p += sizeof(haddr_t); nseen++; } END_MEMBERS; - if (H5Tconvert(H5T_NATIVE_HADDR, H5T_STD_U64LE, nseen, buf+8, NULL, + if (H5Tconvert(H5T_NATIVE_HADDR, H5T_STD_U64LE, nseen*2, buf+8, NULL, H5P_DEFAULT)<0) { H5Epush_ret(func, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1); } -- cgit v0.12