From 1abd2e89f6caa81b3c32a5827ba2083c3b50c318 Mon Sep 17 00:00:00 2001 From: David Schneller Date: Sat, 18 May 2024 13:51:07 +0200 Subject: [PATCH] Add null terminator character --- src/pumgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pumgen.cpp b/src/pumgen.cpp index 98a5a97..48a5f55 100644 --- a/src/pumgen.cpp +++ b/src/pumgen.cpp @@ -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()));