snprintf replacement: Make sure the result is NUL terminated.
commitf32edf6b14ae405b9e7a4842f18990de6bb4a322
authorJohannes Sixt <johannes.sixt@telecom.at>
Fri, 28 Mar 2008 15:00:17 +0000 (28 16:00 +0100)
committerJohannes Sixt <johannes.sixt@telecom.at>
Thu, 3 Apr 2008 07:47:38 +0000 (3 09:47 +0200)
treefa35e65d4a6212efed4ead99c569caf4b77dc1d3
parent40c020f0d8a013cc10aa730b651c7305af81dec1
snprintf replacement: Make sure the result is NUL terminated.

On Windows, if the resulting string fits exactly in the provided buffer,
but not the terminating NUL, then the return value of the system's
vsnprintf is the number of characters written. But since we had reserved
an extra byte anyway, we only need to make sure that the result is
NUL terminated.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
compat/snprintf.c