Author: tkreuzer Date: Tue Sep 18 22:01:38 2012 New Revision: 57329
URL: http://svn.reactos.org/svn/reactos?rev=57329&view=rev Log: [WIN32K] make sure at least one rect is allocated in REGION_PtsToRegion. Fixes failed assertion when starting pacman4000 (the game itself doesn't work though) CORE-5431 #resolve
Modified: trunk/reactos/win32ss/gdi/ntgdi/region.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/region.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/region.c?... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/region.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/region.c [iso-8859-1] Tue Sep 18 22:01:38 2012 @@ -2911,6 +2911,12 @@
numRects = ((numFullPtBlocks * NUMPTSTOBUFFER) + iCurPtBlock) >> 1;
+ /* Make sure, we have at least one rect */ + if (numRects == 0) + { + numRects = 1; + } + if (!(temp = ExAllocatePoolWithTag(PagedPool, numRects * sizeof(RECT), TAG_REGION))) { return 0;