Commit dd01d39f authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

kernel32: Fix return values of GetConsoleCursorInfo.

parent 296bbde1
......@@ -2239,7 +2239,15 @@ BOOL WINAPI GetConsoleCursorInfo(HANDLE hCon, LPCONSOLE_CURSOR_INFO cinfo)
}
SERVER_END_REQ;
TRACE("(%p) returning (%d,%d)\n", hCon, cinfo->dwSize, cinfo->bVisible);
if (!ret) return FALSE;
if (!cinfo)
{
SetLastError(ERROR_INVALID_ACCESS);
ret = FALSE;
}
else TRACE("(%p) returning (%d,%d)\n", hCon, cinfo->dwSize, cinfo->bVisible);
return ret;
}
......
......@@ -168,12 +168,9 @@ static void testCursorInfo(HANDLE hCon)
SetLastError(0xdeadbeef);
ret = GetConsoleCursorInfo(hCon, NULL);
todo_wine
{
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_ACCESS, "GetLastError: expecting %u got %u\n",
ERROR_INVALID_ACCESS, GetLastError());
}
}
static void testWriteSimple(HANDLE hCon, COORD sbSize)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment