[GDI32]
authorRafal Harabien <rafalh@reactos.org>
Mon, 21 Mar 2011 17:58:08 +0000 (17:58 +0000)
committerRafal Harabien <rafalh@reactos.org>
Mon, 21 Mar 2011 17:58:08 +0000 (17:58 +0000)
GetTextExtentExPointW doesn't fail if nMaxExtent is negative (only ANSI version does)
Fixes gdi32:GetTextExtentExPoint apitest

svn path=/trunk/; revision=51111

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

index 75b79c3..5de6edc 100644 (file)
@@ -194,11 +194,9 @@ GetTextExtentExPointW(
 )
 {
 
+    /* Windows doesn't check nMaxExtent validity in unicode version */
     if(nMaxExtent < -1)
-    {
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return FALSE;
-    }
+        DPRINT("nMaxExtent is invalid: %d\n", nMaxExtent);
 
     return NtGdiGetTextExtentExW (
                hdc, (LPWSTR)lpszStr, cchString, nMaxExtent, (PULONG)lpnFit, (PULONG)alpDx, lpSize, 0 );