1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-11-03 20:54:07 +01:00

use strncat instead of strcat

This commit is contained in:
q-posev 2021-06-08 14:59:03 +02:00
parent 2e210bc212
commit 842b0efaa8

View File

@ -497,11 +497,7 @@ trexio_hdf5_read_$group_dset$ (trexio_t* const file, char* const $group_dset$, c
// after calling H5Treclaim or H5Dvlen_reclaim functions
strcpy($group_dset$, "");
for (uint64_t i=0; i<dims[0]; i++) {
if (max_str_len < strlen(rdata[i])) {
strncat($group_dset$, rdata[i], max_str_len);
} else {
strcat($group_dset$, rdata[i]);
}
strncat($group_dset$, rdata[i], max_str_len);
strcat($group_dset$, TREXIO_DELIM);
}