- Unbreak GetTextFaceA/W, broken since 28730 by GreatLord
authorStefan Ginsberg <stefanginsberg@gmail.com>
Thu, 16 Oct 2008 20:02:22 +0000 (20:02 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Thu, 16 Oct 2008 20:02:22 +0000 (20:02 +0000)
svn path=/trunk/; revision=36773

reactos/dll/win32/gdi32/objects/text.c

index 7dd259c..82ec9fb 100644 (file)
@@ -358,20 +358,24 @@ ExtTextOutW(
  * @implemented
  */
 INT
-STDCALL
+WINAPI
 GetTextFaceW(HDC hDC,
-             int nCount,
-             LPWSTR    lpFaceName)
+             INT nCount,
+             PWSTR pFaceName)
 {
-    INT retValue = 0;
-    if ((!lpFaceName) || (nCount))
+    INT retValue;
+
+    if ((pFaceName && nCount) ||
+        !(pFaceName && nCount))
     {
-        retValue = NtGdiGetTextFaceW(hDC,nCount,lpFaceName,0);
+        retValue = NtGdiGetTextFaceW(hDC, nCount, pFaceName, 0);
     }
     else
     {
         SetLastError(ERROR_INVALID_PARAMETER);
+        retValue = 0;
     }
+
     return retValue;
 }