From ae406918bba765ef51124df9bb019a9a5cdbc2a1 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 27 Sep 2014 12:06:03 +0000 Subject: [PATCH] [WIN32K] Fix _FLOATOBJ_IsLong (0 - lMant == 0 / lExp == 0 - was not evaluated as TRUE) svn path=/trunk/; revision=64338 --- reactos/win32ss/gdi/eng/floatobj.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/reactos/win32ss/gdi/eng/floatobj.h b/reactos/win32ss/gdi/eng/floatobj.h index 8101c5fdb33..a3e9a8a456b 100644 --- a/reactos/win32ss/gdi/eng/floatobj.h +++ b/reactos/win32ss/gdi/eng/floatobj.h @@ -33,9 +33,11 @@ BOOL _FLOATOBJ_IsLong(FLOATOBJ *pf) { EFLOAT_S *pef = (EFLOAT_S*)pf; - ULONG Shift = 32 - pef->lExp; - if (Shift > 31) return FALSE; - return (((pef->lMant >> Shift) << Shift) == pef->lMant); + ULONG ulShift = pef->lExp; + if (ulShift < 32) + return ((pef->lMant << ulShift) == 0); + else + return (ulShift == 32); } FORCEINLINE