<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>On Friday, 19 Dec 2014 06:45:57 -0800, Chris Robinson wrote:<br><div>> Special-casing buff=NULL size=0 sounds like MS's attempt to add a bit <br>> more C99 compliance to the (v)snprintf functions, in addition to adding <br>> more C99 functions in general, which they've been talking about the last <br>> couple of years. This behavior may be different from older pre-VS2013 <br>> versions.<br><br>I ran the same tests earlier today using VS2008 and VS2010, and I got the same results. Both vsnprintf and _vsnwprintf behave the same way.<br><br>I added two tests to dlls/msvcrt/tests/printf.c (not sure if that was the correct place) and submitted the diff to the testbot.<br><br>[1] https://testbot.winehq.org/JobDetails.pl?Key=10842<br>[2] https://testbot.winehq.org/JobDetails.pl?Key=10843<br><br>The tests pass on all VMs, except for W2000. That OS fails when calling vsnprintf(NULL, 0, fmt, args).<br><br>    ret = _vsnwprintf_wrapper( NULL, 0, format, one, two, three );<br>    ok( ret == 11, "got %d, expected 11\n", ret );<br><br>What's the best way to handle the different return value in Wine tests?<br><br>    ok( ret == 11 || ret == -1, "got %d, expected 11\n", ret );<br></div>                                          </div></body>
</html>