apio
8d46c9bbe2
Every time printf flushes the buffer to us in sprintf() or snprintf(), we call strncat to append the data. But we want to start from the beginning in the first flush. What if there was data already there? Well, we just append to the old data. Which is not good, and breaks snprintf()'s maximum size policy. This fix sets the first byte of str to NULL, to avoid this. |
||
---|---|---|
.. | ||
libgen.cpp | ||
stdio.cpp | ||
stdlib.cpp | ||
string.cpp |