Skip to content

Commit

Permalink
Removed strnlen
Browse files Browse the repository at this point in the history
  • Loading branch information
scemama committed Dec 5, 2024
1 parent a5d39ac commit 72619db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/templates_front/templator_front.org
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,8 @@ void
trexio_string_of_error_f (const trexio_exit_code error, char result[<<MAX_STRING_LENGTH()>>])
{
const char* pSrc = trexio_string_of_error(error);
size_t sizeCp = strnlen(pSrc, <<MAX_STRING_LENGTH()>>);
size_t sizeCp = strlen(pSrc);
if (sizeCp > MAX_STRING_LENGTH) sizeCp = MAX_STRING_LENGTH;
memcpy(result, pSrc, sizeCp);
result[sizeCp] = '\0';
}
Expand Down

0 comments on commit 72619db

Please sign in to comment.