
25 Oct
2004
25 Oct
'04
12:44 p.m.
On Sat, 23 Oct 2004 07:10:48 +0000 (UTC), Darryl Green <darryl.green@unitab.com.au> wrote:
char buf[101]; va_list args; va_start(args, fmt); int n = vsnprintf (buf, 101, fmt, args)); va_end(args); if (n < 0) return;
This is one of the reasons I find the *snprintf functions to be pure evil. They don't return -1 when the output would be too long, they return the size they WOULD have written if the buffer was large enough. Is this code doing what you intend? -- Caleb Epstein caleb.epstein@gmail.com