Fix splitting of cells (noticed by Hartmut).
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c
Modified: trunk/reactos/ntoskrnl/cm/regfile.c
Modified: trunk/reactos/tools/mkhive/binhive.c

Modified: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c
--- trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c	2005-11-26 16:35:23 UTC (rev 19641)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c	2005-11-26 16:36:18 UTC (rev 19642)
@@ -809,6 +809,7 @@
     {
       NewBlock = (PCELL_HEADER) ((ULONG)NewBlock + CellSize);
       NewBlock->CellSize = ((PCELL_HEADER) (*Block))->CellSize - CellSize;
+      ((PCELL_HEADER) (*Block))->CellSize = CellSize;
       CmiAddFree (RegistryHive,
 		  NewBlock,
 		  *pBlockOffset + CellSize,

Modified: trunk/reactos/ntoskrnl/cm/regfile.c
--- trunk/reactos/ntoskrnl/cm/regfile.c	2005-11-26 16:35:23 UTC (rev 19641)
+++ trunk/reactos/ntoskrnl/cm/regfile.c	2005-11-26 16:36:18 UTC (rev 19642)
@@ -3417,6 +3417,7 @@
 	{
 	  NewCell = (PCELL_HEADER) ((ULONG_PTR) NewCell + CellSize);
 	  NewCell->CellSize = ((PCELL_HEADER) (*Cell))->CellSize - CellSize;
+	  ((PCELL_HEADER) (*Cell))->CellSize = CellSize;
 	  CmiAddFree(RegistryHive,
 		     NewCell,
 		     *CellOffset + CellSize,

Modified: trunk/reactos/tools/mkhive/binhive.c
--- trunk/reactos/tools/mkhive/binhive.c	2005-11-26 16:35:23 UTC (rev 19641)
+++ trunk/reactos/tools/mkhive/binhive.c	2005-11-26 16:36:18 UTC (rev 19642)
@@ -829,6 +829,7 @@
     {
       NewBlock = (PCELL_HEADER) ((ULONG_PTR) NewBlock + CellSize);
       NewBlock->CellSize = ((PCELL_HEADER) (*Block))->CellSize - CellSize;
+      ((PCELL_HEADER) (*Block))->CellSize = CellSize;
       CmiAddFree (RegistryHive,
 		  NewBlock,
 		  *pBlockOffset + CellSize,