ucrtbase: Handle the swprintf style termination and return values.
commitb09aadd202db469a8bab163624986961a1472111
authorMartin Storsjo <martin@martin.st>
Tue, 3 Nov 2015 18:40:35 +0000 (3 20:40 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 4 Nov 2015 10:18:42 +0000 (4 19:18 +0900)
treea17678c5e9fa25fa9988f81ea780569567669fd8
parentcc0420ac3115d04c724d3d3ee4913d38146dcb63
ucrtbase: Handle the swprintf style termination and return values.

When neither the "legacy vsprintf null termination" nor the "standard
snprintf behaviour" flags are specified, the functions return -2 when
the output string didn't fit (similar to old style msvcrt _snprintf that
returned -1), but they are null terminated (similar to the C99 snprintf
style behaviour). This is the same way as the C99 swprintf function
behaves.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/msvcrt/msvcrt.h
dlls/msvcrt/wcs.c
dlls/ucrtbase/tests/printf.c