mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-03-04 06:10:23 +01:00
Removed strnlen
This commit is contained in:
parent
a5d39acc92
commit
72619db8c4
@ -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';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user