From 8a2a587e574bbd983523f535de82144f64b6656d Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Mon, 21 Oct 2024 12:09:37 +0300 Subject: [PATCH] [WIN32K:NTGDI] Save and restore FP state in IntGdiWidenPath --- win32ss/gdi/ntgdi/path.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/win32ss/gdi/ntgdi/path.c b/win32ss/gdi/ntgdi/path.c index a8e58500938..d4c5b85bb60 100644 --- a/win32ss/gdi/ntgdi/path.c +++ b/win32ss/gdi/ntgdi/path.c @@ -1792,6 +1792,7 @@ IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit) PPATH flat_path, pNewPath, *pStrokes = NULL, *pOldStrokes, pUpPath, pDownPath; BYTE *type; DWORD joint, endcap; + KFLOATING_SAVE fpsave; endcap = (PS_ENDCAP_MASK & penStyle); joint = (PS_JOIN_MASK & penStyle); @@ -1885,6 +1886,8 @@ IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit) pNewPath = PATH_CreatePath( flat_path->numEntriesUsed ); + KeSaveFloatingPointState(&fpsave); + for (i = 0; i < numStrokes; i++) { pUpPath = ExAllocatePoolWithTag(PagedPool, sizeof(PATH), TAG_PATH); @@ -2109,6 +2112,9 @@ IntGdiWidenPath(PPATH pPath, UINT penWidth, UINT penStyle, FLOAT eMiterLimit) PATH_Delete(flat_path->BaseObject.hHmgr); pNewPath->state = PATH_Closed; PATH_UnlockPath(pNewPath); + + KeRestoreFloatingPointState(&fpsave); + return pNewPath; }