Closed Bogdanisar closed 2 years ago
We need to use sizeof(random_chars) - 1 as a modulus for random_chars instead of sizeof(random_chars) because the first variant can also return \0 in the middle of the generated c-string.
sizeof(random_chars) - 1
random_chars
sizeof(random_chars)
\0
This resolves #301 .
We need to use
sizeof(random_chars) - 1
as a modulus forrandom_chars
instead ofsizeof(random_chars)
because the first variant can also return\0
in the middle of the generated c-string.This resolves #301 .