Skip to content

Commit 8a2a587

Browse files
committed
[WIN32K:NTGDI] Save and restore FP state in IntGdiWidenPath
1 parent 3d70478 commit 8a2a587

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

win32ss/gdi/ntgdi/path.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,6 +1792,7 @@ IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit)
17921792
PPATH flat_path, pNewPath, *pStrokes = NULL, *pOldStrokes, pUpPath, pDownPath;
17931793
BYTE *type;
17941794
DWORD joint, endcap;
1795+
KFLOATING_SAVE fpsave;
17951796

17961797
endcap = (PS_ENDCAP_MASK & penStyle);
17971798
joint = (PS_JOIN_MASK & penStyle);
@@ -1885,6 +1886,8 @@ IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit)
18851886

18861887
pNewPath = PATH_CreatePath( flat_path->numEntriesUsed );
18871888

1889+
KeSaveFloatingPointState(&fpsave);
1890+
18881891
for (i = 0; i < numStrokes; i++)
18891892
{
18901893
pUpPath = ExAllocatePoolWithTag(PagedPool, sizeof(PATH), TAG_PATH);
@@ -2109,6 +2112,9 @@ IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit)
21092112
PATH_Delete(flat_path->BaseObject.hHmgr);
21102113
pNewPath->state = PATH_Closed;
21112114
PATH_UnlockPath(pNewPath);
2115+
2116+
KeRestoreFloatingPointState(&fpsave);
2117+
21122118
return pNewPath;
21132119
}
21142120

0 commit comments

Comments
 (0)