From 8428a0ab0f51f7278511c4d938b90b1aa5ebec84 Mon Sep 17 00:00:00 2001 From: q-posev Date: Mon, 11 Jul 2022 16:36:58 +0200 Subject: [PATCH] Fix compiler warning during strncpy The size of 32 correspond to previously allocated block of memory and SHOULD be adapted accordingly --- src/templates_text/templator_text.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates_text/templator_text.org b/src/templates_text/templator_text.org index b54f0c1..f1ebae4 100644 --- a/src/templates_text/templator_text.org +++ b/src/templates_text/templator_text.org @@ -435,7 +435,7 @@ trexio_text_read_$group$ (trexio_text_t* const file) } size_t tmp_$group_dset$_len = strlen(buffer); - strncpy(tmp_$group_dset$, buffer, tmp_$group_dset$_len + 1); + strncpy(tmp_$group_dset$, buffer, 32); tmp_$group_dset$ += tmp_$group_dset$_len + 1; } }