From a46f951ea0f9fa3be5b7d61d2b1f7116e28ced9d Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 10 Jul 2001 13:05:11 -0500 Subject: [svn-r4171] Purpose: Bug fix (by Bob McGrath) Description: On Solaris platforms palette was not written to the HDF5 file Solution: '\0' character was written outside the GroupName array. Apparently on Solaris it destroyed the condition value that determined if the palette should be written to the file. Platforms tested: Not tested yet. --- hl/tools/gif2h5/writehdf.c | 2 +- tools/gifconv/writehdf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hl/tools/gif2h5/writehdf.c b/hl/tools/gif2h5/writehdf.c index 5426c27..313b57e 100644 --- a/hl/tools/gif2h5/writehdf.c +++ b/hl/tools/gif2h5/writehdf.c @@ -95,7 +95,7 @@ char *GIFFileName; fprintf(stderr , "strncpy failed\n"); exit(1); } - GroupName[VSNAMELENMAX] = '\0'; + GroupName[VSNAMELENMAX - 1] = '\0'; if ((file_id = H5Fcreate(HDFName , H5F_ACC_TRUNC , H5P_DEFAULT , H5P_DEFAULT)) < 0) { diff --git a/tools/gifconv/writehdf.c b/tools/gifconv/writehdf.c index 5426c27..313b57e 100644 --- a/tools/gifconv/writehdf.c +++ b/tools/gifconv/writehdf.c @@ -95,7 +95,7 @@ char *GIFFileName; fprintf(stderr , "strncpy failed\n"); exit(1); } - GroupName[VSNAMELENMAX] = '\0'; + GroupName[VSNAMELENMAX - 1] = '\0'; if ((file_id = H5Fcreate(HDFName , H5F_ACC_TRUNC , H5P_DEFAULT , H5P_DEFAULT)) < 0) { -- cgit v0.12