mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 17:06:29 +00:00
[GDI32]
- Return 1 on failure in IntEnumFontFamilies, as shown by the test CORE-8628 #resolve svn path=/trunk/; revision=64720
This commit is contained in:
parent
00109ad544
commit
d5b17b9082
|
@ -206,7 +206,7 @@ IntEnumFontFamilies(HDC Dc, LPLOGFONTW LogFont, PVOID EnumProc, LPARAM lParam,
|
||||||
int FontFamilyCount;
|
int FontFamilyCount;
|
||||||
int FontFamilySize;
|
int FontFamilySize;
|
||||||
PFONTFAMILYINFO Info;
|
PFONTFAMILYINFO Info;
|
||||||
int Ret = 0;
|
int Ret = 1;
|
||||||
int i;
|
int i;
|
||||||
ENUMLOGFONTEXA EnumLogFontExA;
|
ENUMLOGFONTEXA EnumLogFontExA;
|
||||||
NEWTEXTMETRICEXA NewTextMetricExA;
|
NEWTEXTMETRICEXA NewTextMetricExA;
|
||||||
|
@ -216,7 +216,7 @@ IntEnumFontFamilies(HDC Dc, LPLOGFONTW LogFont, PVOID EnumProc, LPARAM lParam,
|
||||||
INITIAL_FAMILY_COUNT * sizeof(FONTFAMILYINFO));
|
INITIAL_FAMILY_COUNT * sizeof(FONTFAMILYINFO));
|
||||||
if (NULL == Info)
|
if (NULL == Info)
|
||||||
{
|
{
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!LogFont)
|
if (!LogFont)
|
||||||
|
@ -231,7 +231,7 @@ IntEnumFontFamilies(HDC Dc, LPLOGFONTW LogFont, PVOID EnumProc, LPARAM lParam,
|
||||||
if (FontFamilyCount < 0)
|
if (FontFamilyCount < 0)
|
||||||
{
|
{
|
||||||
RtlFreeHeap(GetProcessHeap(), 0, Info);
|
RtlFreeHeap(GetProcessHeap(), 0, Info);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
if (INITIAL_FAMILY_COUNT < FontFamilyCount)
|
if (INITIAL_FAMILY_COUNT < FontFamilyCount)
|
||||||
{
|
{
|
||||||
|
@ -241,13 +241,13 @@ IntEnumFontFamilies(HDC Dc, LPLOGFONTW LogFont, PVOID EnumProc, LPARAM lParam,
|
||||||
FontFamilyCount * sizeof(FONTFAMILYINFO));
|
FontFamilyCount * sizeof(FONTFAMILYINFO));
|
||||||
if (NULL == Info)
|
if (NULL == Info)
|
||||||
{
|
{
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
FontFamilyCount = NtGdiGetFontFamilyInfo(Dc, LogFont, Info, FontFamilySize);
|
FontFamilyCount = NtGdiGetFontFamilyInfo(Dc, LogFont, Info, FontFamilySize);
|
||||||
if (FontFamilyCount < 0 || FontFamilySize < FontFamilyCount)
|
if (FontFamilyCount < 0 || FontFamilySize < FontFamilyCount)
|
||||||
{
|
{
|
||||||
RtlFreeHeap(GetProcessHeap(), 0, Info);
|
RtlFreeHeap(GetProcessHeap(), 0, Info);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ TestEnumFontFamiliesA(
|
||||||
EnumProcA,
|
EnumProcA,
|
||||||
(LPARAM)&ContextContinue);
|
(LPARAM)&ContextContinue);
|
||||||
error = GetLastError();
|
error = GetLastError();
|
||||||
ok(ret == 1, "ret is %d, expected 0\n", ret);
|
ok(ret == 1, "ret is %d, expected 1\n", ret);
|
||||||
ok(error == 0xdeadbeef, "error is %lu\n", error);
|
ok(error == 0xdeadbeef, "error is %lu\n", error);
|
||||||
ok(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls);
|
ok(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls);
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ TestEnumFontFamiliesW(
|
||||||
EnumProcW,
|
EnumProcW,
|
||||||
(LPARAM)&ContextContinue);
|
(LPARAM)&ContextContinue);
|
||||||
error = GetLastError();
|
error = GetLastError();
|
||||||
ok(ret == 1, "ret is %d, expected 0\n", ret);
|
ok(ret == 1, "ret is %d, expected 1\n", ret);
|
||||||
ok(error == 0xdeadbeef, "error is %lu\n", error);
|
ok(error == 0xdeadbeef, "error is %lu\n", error);
|
||||||
ok(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls);
|
ok(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls);
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ TestEnumFontFamiliesExA(
|
||||||
(LPARAM)&ContextContinue,
|
(LPARAM)&ContextContinue,
|
||||||
0);
|
0);
|
||||||
error = GetLastError();
|
error = GetLastError();
|
||||||
ok(ret == 1, "ret is %d, expected 0\n", ret);
|
ok(ret == 1, "ret is %d, expected 1\n", ret);
|
||||||
ok(error == 0xdeadbeef, "error is %lu\n", error);
|
ok(error == 0xdeadbeef, "error is %lu\n", error);
|
||||||
ok(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls);
|
ok(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls);
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ TestEnumFontFamiliesExW(
|
||||||
(LPARAM)&ContextContinue,
|
(LPARAM)&ContextContinue,
|
||||||
0);
|
0);
|
||||||
error = GetLastError();
|
error = GetLastError();
|
||||||
ok(ret == 1, "ret is %d, expected 0\n", ret);
|
ok(ret == 1, "ret is %d, expected 1\n", ret);
|
||||||
ok(error == 0xdeadbeef, "error is %lu\n", error);
|
ok(error == 0xdeadbeef, "error is %lu\n", error);
|
||||||
ok(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls);
|
ok(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue