Allocate enough bytes for the adapter object.
Modified: trunk/reactos/hal/halx86/generic/adapter.c

Modified: trunk/reactos/hal/halx86/generic/adapter.c
--- trunk/reactos/hal/halx86/generic/adapter.c	2005-01-02 17:55:06 UTC (rev 12728)
+++ trunk/reactos/hal/halx86/generic/adapter.c	2005-01-02 18:00:31 UTC (rev 12729)
@@ -1,4 +1,4 @@
-/* $Id: adapter.c,v 1.1 2004/12/03 20:10:43 gvg Exp $
+/* $Id$
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -203,7 +203,7 @@
 	/* Check if this is the Master Adapter, in which case we need to allocate the bitmap */
 	if (IsMaster) {
 		/* Size due to the Bitmap + Bytes in the Bitmap Buffer (8 bytes, 64 bits)*/
-		BitmapSize = sizeof(RTL_BITMAP) + AllowedMapRegisters / 8;
+		BitmapSize = sizeof(RTL_BITMAP) + (AllowedMapRegisters + 7) / 8;
 		
 		/* We will put the Bitmap Buffer after the Adapter Object for simplicity */
 		ObjectSize = sizeof(ADAPTER_OBJECT) + BitmapSize;