Skip to content

Commit

Permalink
reworking of filename copy (#33)
Browse files Browse the repository at this point in the history
* reworked hdf5 filename
  • Loading branch information
brtnfld authored Dec 23, 2024
1 parent c15ada9 commit 179b5af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hdf5_iotest.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ int main(int argc, char* argv[])
/* test collective and independent modes when parallel, and greater than 0 ranks */
if (size > 1) nmod = 1;

char hdf5_filename[strlen(config.hdf5_file+4)];
char hdf5_filename[strlen(config.hdf5_file)+1];

/* use a macro to stop the indentation madness */

Expand Down Expand Up @@ -312,7 +312,7 @@ int main(int argc, char* argv[])
if (rank == 0)
print_current_config(&config);

strcpy( hdf5_filename, config.hdf5_file);
strncpy( hdf5_filename, config.hdf5_file, strlen(config.hdf5_file) + 1);

if(config.HDF5perCase != 0)
{
Expand Down

0 comments on commit 179b5af

Please sign in to comment.