[ros-diffs] [jimtabor] 51093: [Win32k] - Fix sign for BeginDeferWindowPos(-1) test, see bug 6025.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Sun Mar 20 00:21:45 UTC 2011


Author: jimtabor
Date: Sun Mar 20 00:21:45 2011
New Revision: 51093

URL: http://svn.reactos.org/svn/reactos?rev=51093&view=rev
Log:
[Win32k]
- Fix sign for BeginDeferWindowPos(-1) test, see bug 6025.


Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c?rev=51093&r1=51092&r2=51093&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Sun Mar 20 00:21:45 2011
@@ -162,13 +162,15 @@
          {
              PSMWP psmwp;
              HDWP hDwp = NULL;
-             if (Param < 0)
+             INT count = (INT)Param;
+
+             if (count < 0)
              {
                 EngSetLastError(ERROR_INVALID_PARAMETER);
                 RETURN(0);
              }
              /* Windows allows zero count, in which case it allocates context for 8 moves */
-             if (Param == 0) Param = 8;
+             if (count == 0) count = 8;
 
              psmwp = (PSMWP) UserCreateObject( gHandleTable,
                                                NULL,
@@ -176,13 +178,13 @@
                                                otSMWP,
                                                sizeof(SMWP));
              if (!psmwp) RETURN(0);
-             psmwp->acvr = ExAllocatePoolWithTag(PagedPool, Param * sizeof(CVR), USERTAG_SWP);
+             psmwp->acvr = ExAllocatePoolWithTag(PagedPool, count * sizeof(CVR), USERTAG_SWP);
              if (!psmwp->acvr)
              {
                 UserDeleteObject(hDwp, otSMWP);
                 RETURN(0);
              }
-             RtlZeroMemory(psmwp->acvr, Param * sizeof(CVR));
+             RtlZeroMemory(psmwp->acvr, count * sizeof(CVR));
              psmwp->bHandle = TRUE;
              psmwp->ccvr = 0;          // actualCount
              psmwp->ccvrAlloc = Param; // suggestedCount             




More information about the Ros-diffs mailing list