diff --git a/reactos/win32ss/gdi/gdi32/objects/font.c b/reactos/win32ss/gdi/gdi32/objects/font.c index 1d0122ca019..d580e5f3085 100644 --- a/reactos/win32ss/gdi/gdi32/objects/font.c +++ b/reactos/win32ss/gdi/gdi32/objects/font.c @@ -206,7 +206,7 @@ IntEnumFontFamilies(HDC Dc, LPLOGFONTW LogFont, PVOID EnumProc, LPARAM lParam, int FontFamilyCount; int FontFamilySize; PFONTFAMILYINFO Info; - int Ret = 0; + int Ret = 1; int i; ENUMLOGFONTEXA EnumLogFontExA; NEWTEXTMETRICEXA NewTextMetricExA; @@ -216,7 +216,7 @@ IntEnumFontFamilies(HDC Dc, LPLOGFONTW LogFont, PVOID EnumProc, LPARAM lParam, INITIAL_FAMILY_COUNT * sizeof(FONTFAMILYINFO)); if (NULL == Info) { - return 0; + return 1; } if (!LogFont) @@ -231,7 +231,7 @@ IntEnumFontFamilies(HDC Dc, LPLOGFONTW LogFont, PVOID EnumProc, LPARAM lParam, if (FontFamilyCount < 0) { RtlFreeHeap(GetProcessHeap(), 0, Info); - return 0; + return 1; } if (INITIAL_FAMILY_COUNT < FontFamilyCount) { @@ -241,13 +241,13 @@ IntEnumFontFamilies(HDC Dc, LPLOGFONTW LogFont, PVOID EnumProc, LPARAM lParam, FontFamilyCount * sizeof(FONTFAMILYINFO)); if (NULL == Info) { - return 0; + return 1; } FontFamilyCount = NtGdiGetFontFamilyInfo(Dc, LogFont, Info, FontFamilySize); if (FontFamilyCount < 0 || FontFamilySize < FontFamilyCount) { RtlFreeHeap(GetProcessHeap(), 0, Info); - return 0; + return 1; } } diff --git a/rostests/apitests/gdi32/EnumFontFamilies.c b/rostests/apitests/gdi32/EnumFontFamilies.c index 861d320f699..290997d85d1 100644 --- a/rostests/apitests/gdi32/EnumFontFamilies.c +++ b/rostests/apitests/gdi32/EnumFontFamilies.c @@ -74,7 +74,7 @@ TestEnumFontFamiliesA( EnumProcA, (LPARAM)&ContextContinue); 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(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls); } @@ -95,7 +95,7 @@ TestEnumFontFamiliesW( EnumProcW, (LPARAM)&ContextContinue); 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(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls); } @@ -122,7 +122,7 @@ TestEnumFontFamiliesExA( (LPARAM)&ContextContinue, 0); 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(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls); } @@ -149,7 +149,7 @@ TestEnumFontFamiliesExW( (LPARAM)&ContextContinue, 0); 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(EnumProcCalls == 0, "EnumProcCalls is %d\n", EnumProcCalls); }