ws2_32: Return WSAEFAULT instead of WSAEINVAL from WSAStartup() if "data" is NULL.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5efc6369eb
commit
a6cbdb7de8
|
@ -594,7 +594,7 @@ int WINAPI WSAStartup( WORD version, WSADATA *data )
|
|||
if (!LOBYTE(version))
|
||||
return WSAVERNOTSUPPORTED;
|
||||
|
||||
if (!data) return WSAEINVAL;
|
||||
if (!data) return WSAEFAULT;
|
||||
|
||||
num_startup++;
|
||||
TRACE( "increasing startup count to %d\n", num_startup );
|
||||
|
|
|
@ -2880,8 +2880,7 @@ static void test_startup(void)
|
|||
ok(WSAGetLastError() == WSANOTINITIALISED, "got error %u\n", WSAGetLastError());
|
||||
|
||||
ret = WSAStartup(tests[i].version, NULL);
|
||||
todo_wine_if (LOBYTE(tests[i].version))
|
||||
ok(ret == (LOBYTE(tests[i].version) ? WSAEFAULT : WSAVERNOTSUPPORTED), "got %d\n", ret);
|
||||
ok(ret == (LOBYTE(tests[i].version) ? WSAEFAULT : WSAVERNOTSUPPORTED), "got %d\n", ret);
|
||||
|
||||
winetest_pop_context();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue