4 ms·
There's that, but with sprintf/vsprintf specifically, there's no way to keep it from storing characters past the end of your buffer. For example: char buf[
by danaliv 6y ago
There's that, but with sprintf/vsprintf specifically, there's no way to keep it from storing characters past the end of your buffer. For example:
char buf[2];
sprintf(buf, "%d", n);
This will happily write to buf[2] and beyond if n is negative or greater than 9.