mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[Win32k]
- Patch by Huw Davies huw@codeweavers.com : Fix incorrect initialization of path array. - Patch was modified from wine. Tested with Area.exe path test, still fails. svn path=/trunk/; revision=44397
This commit is contained in:
parent
9e98fb7c05
commit
3d166388d3
1 changed files with 13 additions and 15 deletions
|
@ -1504,9 +1504,9 @@ BOOL
|
||||||
FASTCALL
|
FASTCALL
|
||||||
PATH_WidenPath(DC *dc)
|
PATH_WidenPath(DC *dc)
|
||||||
{
|
{
|
||||||
INT i, j, numStrokes, numOldStrokes, penWidth, penWidthIn, penWidthOut, size, penStyle;
|
INT i, j, numStrokes, penWidth, penWidthIn, penWidthOut, size, penStyle;
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
PPATH pPath, pNewPath, *pStrokes, *pOldStrokes, pUpPath, pDownPath;
|
PPATH pPath, pNewPath, *pStrokes = NULL, *pOldStrokes, pUpPath, pDownPath;
|
||||||
EXTLOGPEN *elp;
|
EXTLOGPEN *elp;
|
||||||
DWORD obj_type, joint, endcap, penType;
|
DWORD obj_type, joint, endcap, penType;
|
||||||
PDC_ATTR pdcattr = dc->pdcattr;
|
PDC_ATTR pdcattr = dc->pdcattr;
|
||||||
|
@ -1572,14 +1572,6 @@ PATH_WidenPath(DC *dc)
|
||||||
penWidthOut++;
|
penWidthOut++;
|
||||||
|
|
||||||
numStrokes = 0;
|
numStrokes = 0;
|
||||||
numOldStrokes = 1;
|
|
||||||
|
|
||||||
pStrokes = ExAllocatePoolWithTag(PagedPool, sizeof(PPATH), TAG_PATH);
|
|
||||||
pStrokes[0] = ExAllocatePoolWithTag(PagedPool, sizeof(PATH), TAG_PATH);
|
|
||||||
PATH_InitGdiPath(pStrokes[0]);
|
|
||||||
pStrokes[0]->pFlags = ExAllocatePoolWithTag(PagedPool, pPath->numEntriesUsed * sizeof(INT), TAG_PATH);
|
|
||||||
pStrokes[0]->pPoints = ExAllocatePoolWithTag(PagedPool, pPath->numEntriesUsed * sizeof(POINT), TAG_PATH);
|
|
||||||
pStrokes[0]->numEntriesUsed = 0;
|
|
||||||
|
|
||||||
for(i = 0, j = 0; i < pPath->numEntriesUsed; i++, j++)
|
for(i = 0, j = 0; i < pPath->numEntriesUsed; i++, j++)
|
||||||
{
|
{
|
||||||
|
@ -1601,11 +1593,17 @@ PATH_WidenPath(DC *dc)
|
||||||
}
|
}
|
||||||
numStrokes++;
|
numStrokes++;
|
||||||
j = 0;
|
j = 0;
|
||||||
|
if (numStrokes == 1)
|
||||||
|
pStrokes = ExAllocatePoolWithTag(PagedPool, numStrokes * sizeof(PPATH), TAG_PATH);
|
||||||
|
else
|
||||||
|
{
|
||||||
pOldStrokes = pStrokes; // Save old pointer.
|
pOldStrokes = pStrokes; // Save old pointer.
|
||||||
pStrokes = ExAllocatePoolWithTag(PagedPool, numStrokes * sizeof(PPATH), TAG_PATH);
|
pStrokes = ExAllocatePoolWithTag(PagedPool, numStrokes * sizeof(PPATH), TAG_PATH);
|
||||||
RtlCopyMemory(pStrokes, pOldStrokes, numOldStrokes * sizeof(PPATH));
|
if (!pStrokes) return FALSE;
|
||||||
numOldStrokes = numStrokes; // Save orig count.
|
RtlCopyMemory(pStrokes, pOldStrokes, numStrokes * sizeof(PPATH));
|
||||||
ExFreePoolWithTag(pOldStrokes, TAG_PATH); // Free old pointer.
|
ExFreePoolWithTag(pOldStrokes, TAG_PATH); // Free old pointer.
|
||||||
|
}
|
||||||
|
if (!pStrokes) return FALSE;
|
||||||
pStrokes[numStrokes - 1] = ExAllocatePoolWithTag(PagedPool, sizeof(PATH), TAG_PATH);
|
pStrokes[numStrokes - 1] = ExAllocatePoolWithTag(PagedPool, sizeof(PATH), TAG_PATH);
|
||||||
|
|
||||||
PATH_InitGdiPath(pStrokes[numStrokes - 1]);
|
PATH_InitGdiPath(pStrokes[numStrokes - 1]);
|
||||||
|
|
Loading…
Reference in a new issue