Skip to content

Commit

Permalink
Merge pull request #72 from SeisSol/davschneller/string-headroom
Browse files Browse the repository at this point in the history
Add null terminator character for HDF5 boundary type string
  • Loading branch information
vikaskurapati authored May 21, 2024
2 parents c9f5518 + 1abd2e8 commit 661c868
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pumgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ int main(int argc, char* argv[]) {

hid_t attrSpace = checkH5Err(H5Screate(H5S_SCALAR));
hid_t attrType = checkH5Err(H5Tcopy(H5T_C_S1));
checkH5Err(H5Tset_size(attrType, boundaryFormatAttr.size()));
checkH5Err(H5Tset_size(attrType, boundaryFormatAttr.size() + 1));
hid_t attrBoundary = checkH5Err(
H5Acreate(h5file, "boundary-format", attrType, attrSpace, H5P_DEFAULT, H5P_DEFAULT));
checkH5Err(H5Awrite(attrBoundary, attrType, boundaryFormatAttr.data()));
Expand Down

0 comments on commit 661c868

Please sign in to comment.