gdi32: stop gdi font test crashing under win98

Dmitry Timoshkov dmitry at codeweavers.com
Tue Jun 10 09:16:25 CDT 2008


"Alistair Leslie-Hughes" <leslie_alistair at hotmail.com> wrote:

>     if (!*font_name && font_charset == DEFAULT_CHARSET) /* do it only once */
>     {
> +        LOGFONT lf;
> +        memset(&lf, 0, sizeof(LOGFONT));
> +        
>         efd.total = 0;
>         SetLastError(0xdeadbeef);
>         ret = EnumFontFamilies(hdc, NULL, arial_enum_proc, (LPARAM)&efd);
> @@ -1333,7 +1336,7 @@ static void test_EnumFontFamilies(const char *font_name, INT font_charset)
> 
>         efd.total = 0;
>         SetLastError(0xdeadbeef);
> -        ret = EnumFontFamiliesEx(hdc, NULL, arial_enum_proc, (LPARAM)&efd, 0);
> +        ret = EnumFontFamiliesEx(hdc, &lf, arial_enum_proc, (LPARAM)&efd, 0);

The test must use NULL in order to match the EnumFontFamilies results
above. If it causes the crash under Win9x the test should be explicitly
skipped on that platform.

-- 
Dmitry.



More information about the wine-devel mailing list