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:
parent
2e210bc212
commit
842b0efaa8
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user