kernel32/pipe: Avoid a crash in a test.

Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Detlef Riekenberg 2019-04-23 19:19:21 +02:00 committed by Alexandre Julliard
parent b3c5062f36
commit f5636dea60

View File

@ -3572,10 +3572,12 @@ static void test_namedpipe_session_id(void)
create_overlapped_pipe(PIPE_TYPE_BYTE, &client, &server);
SetLastError(0xdeadbeef);
ret = pGetNamedPipeClientSessionId(server, NULL);
ok(!ret, "success\n");
todo_wine ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %u\n", GetLastError());
if (0) /* crashes on recent Windows */
{
SetLastError(0xdeadbeef);
ret = pGetNamedPipeClientSessionId(server, NULL);
ok(!ret, "success\n");
}
id = 0;
ret = pGetNamedPipeClientSessionId(server, &id);