Author: rharabien
Date: Wed Apr 13 08:14:37 2011
New Revision: 51328
URL:
http://svn.reactos.org/svn/reactos?rev=51328&view=rev
Log:
[GDI32]
* DPtoLP/LPtoDP functions should return TRUE even if they get 0 or less points or if
pointer to points is invalid. See gdi32:DPtoLP apitest.
* Fixes 24 gdi32:DPtoLP apitests.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/coord.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/coord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/coord.c [iso-8859-1] Wed Apr 13 08:14:37
2011
@@ -256,18 +256,14 @@
PDC pdc;
LPPOINT Points;
ULONG Size;
- BOOL ret;
+ BOOL ret = TRUE;
+
+ if (Count <= 0)
+ return TRUE;
pdc = DC_LockDc(hDC);
if (!pdc)
{
- EngSetLastError(ERROR_INVALID_HANDLE);
- return FALSE;
- }
-
- if (!UnsafePtsIn || !UnsafePtOut || Count <= 0)
- {
- DC_UnlockDc(pdc);
EngSetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
@@ -291,8 +287,7 @@
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- SetLastNtError(_SEH2_GetExceptionCode());
- ret = FALSE;
+ /* Do not set last error */
_SEH2_YIELD(goto leave;)
}
_SEH2_END;
@@ -323,8 +318,7 @@
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- SetLastNtError(_SEH2_GetExceptionCode());
- ret = FALSE;
+ /* Do not set last error */
}
_SEH2_END;