On Fri, Aug 21, 2009 at 5:57 PM, <sginsberg(a)svn.reactos.org> wrote:
--- 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);
+ }
Why not use *NetworkAddressLength = (UINT)((j+1)/2); unconditionally?
if ((*NetworkAddressLength) == 0)
{
F.