Stefan, this is exactly what I meant by 'there is _almost_ always a better solution than using kesavefloatingpointstate' :)
Ged. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Timo Kreuzer Sent: 21 August 2009 23:38 To: [email protected] Subject: Re: [ros-dev] [ros-diffs] [sginsberg] 42829: - svchost: #ifdef _MSC_VER doesn't mean "using Microsoft's headers" anymore - ddraw, imm32, msxml3, oleaut32, riched20: Include typeof.h for typeof emulation when compiling under MSVC and remove from ReactOS-ge lol+1! [email protected] wrote: > Author: sginsberg > Date: Fri Aug 21 17:57:26 2009 > New Revision: 42829 > > URL: http://svn.reactos.org/svn/reactos?rev=42829&view=rev > Log: > [...] > - NDIS: Don't use floating point arithmetics in kernel mode -- spotted by MSVC trying to link to ftol (gcc inlined the operation). > [...] > > > Modified: trunk/reactos/drivers/network/ndis/ndis/config.c > URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/c onfig.c?rev=42829&r1=42828&r2=42829&view=diff > ============================================================================ == > --- trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] (original) > +++ trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] Fri Aug 21 17:57:26 2009 > @@ -705,7 +705,14 @@ > > while (j < str.Length && str.Buffer[j] != '\0') j++; > > - *NetworkAddressLength = (UINT)((j/2)+0.5); > + if ((j % 2) == 0) > + { > + *NetworkAddressLength = (UINT)(j/2); > + } > + else > + { > + *NetworkAddressLength = (UINT)((j/2)+1); > + } > > if ((*NetworkAddressLength) == 0) > { > > _______________________________________________ Ros-dev mailing list [email protected] http://www.reactos.org/mailman/listinfo/ros-dev _______________________________________________ Ros-dev mailing list [email protected] http://www.reactos.org/mailman/listinfo/ros-dev
