Fixes regression introduced by 35c8f15bc67f7602438fe0c39a69ff6ddf6b8297
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55215
We already test for an invalid pointer, those tests don't really help. The test against DrawTextA crashes on windows sometimes, the other test shows that windows probably just overruns the stack variable: `textheight = DrawTextExA((HDC)0xdeadbeef, (LPSTR)0xdeadbeef, 100, &rect, 0, 0);`
From: Fabian Maurer dark.shadow4@web.de
Fixes regression introduced by 35c8f15bc67f7602438fe0c39a69ff6ddf6b8297
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55215 --- dlls/user32/tests/text.c | 9 --------- 1 file changed, 9 deletions(-)
diff --git a/dlls/user32/tests/text.c b/dlls/user32/tests/text.c index 90fe7421b02..a2990a9706b 100644 --- a/dlls/user32/tests/text.c +++ b/dlls/user32/tests/text.c @@ -521,10 +521,6 @@ static void test_DrawTextCalcRect(void) }
/* When passing invalid DC, other parameters must be ignored - no crashes on invalid pointers */ - SetLastError(0xdeadbeef); - textheight = DrawTextExW((HDC)0xdeadbeef, emptystringW, 100000, (LPRECT)0xdeadbeef, 0, 0); - ok(textheight == 0, "Got textheight from DrawTextExW\n"); - ok(GetLastError() == 0xdeadbeef,"Got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); textheight = DrawTextExW((HDC)0xdeadbeef, (LPWSTR)0xdeadbeef, 100000, &rect, 0, 0); @@ -536,11 +532,6 @@ static void test_DrawTextCalcRect(void) ok(textheight == 0, "Got textheight from DrawTextExW\n"); ok(GetLastError() == 0xdeadbeef,"Got error %lu\n", GetLastError());
- SetLastError(0xdeadbeef); - textheight = DrawTextExA((HDC)0xdeadbeef, emptystring, 100000, (LPRECT)0xdeadbeef, 0, 0); - ok(textheight == 0, "Got textheight from DrawTextExA\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_HANDLE,"Got error %lu\n", GetLastError()); - SetLastError(0xdeadbeef); textheight = DrawTextExA((HDC)0xdeadbeef, 0, -1, (LPRECT)0xdeadbeef, DT_CALCRECT, 0); ok(textheight == 0, "Got textheight from DrawTextExA\n");