Jeffrey Walton wrote:
> snprintf is kind of a lame for a replacement since it backfills the
> buffer with all 0's.

Nope, it doesn't. [1]
You must be confusing it with strncpy(), which fills all the buffer. [2]

Bruno

[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/fprintf.html
[2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/strncpy.html




Reply via email to