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/config.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
