]> git.sesse.net Git - vlc/commit
win32: make vlc_vsnprintf more like c99 vsnprintf
authorDavid Flynn <davidf@rd.bbc.co.uk>
Wed, 1 Apr 2009 21:40:04 +0000 (21:40 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 3 Apr 2009 10:11:02 +0000 (12:11 +0200)
commit30f33e7a0e3726404e4b9d2f51840e8de1a527f3
tree516de19ba433e9f9cc1dfaa1194390140a1cc641
parent3779d5bd1c335d724b31ce730a8387cb7770fc06
win32: make vlc_vsnprintf more like c99 vsnprintf

Fixes following issues using MSVCRT _snprintf:
 - Failure to null terminate all strings
 - Failure to return number of characters that would've been
   printed had the buffer been sufficiently large
 - Failure to accept size = 0 (and str = NULL) to determine
   final output length.

NB, the third issue above is fixed on *some* win32 implementations,
however it is not officially documented as being so.

Signed-off-by: David Flynn <davidf@rd.bbc.co.uk>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
include/vlc_fixups.h