Re: g_snprintf() implementation

On Sun, 18 Apr 1999, Havoc Pennington wrote:

> Hi,
> g_snprintf() has two possible implementations, one which uses vsnprintf()
> and one which doesn't. Only the one which doesn't does this:
> str[n-1] = '\0';
> According to the man page, vsnprintf() does *not* do this, since it
> behaves just like regular snprintf(). The other problem is that
> vsnprintf() potentially returns -1, but the other implementation does not.
> I think the vsnprintf() version should be changed to null-terminate and
> never return -1.
> Am I missing something?

nope, you're absolutely right, please make the appropriate change.

> Havoc


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]