Return a negative value to indicate truncation.

If the maximum availalbe buffer size is zero, no data can be written
(not even the NULL terminator), and a negative values should be returned
to indicate truncation.
This commit is contained in:
Jef Driesen 2012-09-15 10:50:19 +02:00
parent dad451f6f9
commit f4eeb7745e

View File

@ -50,7 +50,7 @@ l_vsnprintf (char *str, size_t size, const char *format, va_list ap)
int n;
if (size == 0)
return 0;
return -1;
#ifdef _MSC_VER
/*