Fix splitting of cells (noticed by Hartmut).
authorFilip Navara <filip.navara@gmail.com>
Sat, 26 Nov 2005 16:36:18 +0000 (16:36 +0000)
committerFilip Navara <filip.navara@gmail.com>
Sat, 26 Nov 2005 16:36:18 +0000 (16:36 +0000)
svn path=/trunk/; revision=19642

reactos/boot/freeldr/freeldr/reactos/binhive.c
reactos/ntoskrnl/cm/regfile.c
reactos/tools/mkhive/binhive.c

index 584a11f..b062b96 100644 (file)
@@ -809,6 +809,7 @@ CmiAllocateCell (PREGISTRY_HIVE RegistryHive,
     {
       NewBlock = (PCELL_HEADER) ((ULONG)NewBlock + CellSize);
       NewBlock->CellSize = ((PCELL_HEADER) (*Block))->CellSize - CellSize;
     {
       NewBlock = (PCELL_HEADER) ((ULONG)NewBlock + CellSize);
       NewBlock->CellSize = ((PCELL_HEADER) (*Block))->CellSize - CellSize;
+      ((PCELL_HEADER) (*Block))->CellSize = CellSize;
       CmiAddFree (RegistryHive,
                  NewBlock,
                  *pBlockOffset + CellSize,
       CmiAddFree (RegistryHive,
                  NewBlock,
                  *pBlockOffset + CellSize,
index 48bd8dc..85b3409 100644 (file)
@@ -3417,6 +3417,7 @@ CmiAllocateCell (PREGISTRY_HIVE RegistryHive,
        {
          NewCell = (PCELL_HEADER) ((ULONG_PTR) NewCell + CellSize);
          NewCell->CellSize = ((PCELL_HEADER) (*Cell))->CellSize - CellSize;
        {
          NewCell = (PCELL_HEADER) ((ULONG_PTR) NewCell + CellSize);
          NewCell->CellSize = ((PCELL_HEADER) (*Cell))->CellSize - CellSize;
+         ((PCELL_HEADER) (*Cell))->CellSize = CellSize;
          CmiAddFree(RegistryHive,
                     NewCell,
                     *CellOffset + CellSize,
          CmiAddFree(RegistryHive,
                     NewCell,
                     *CellOffset + CellSize,
index 381e459..6b3dfb8 100644 (file)
@@ -829,6 +829,7 @@ CmiAllocateCell (PREGISTRY_HIVE RegistryHive,
     {
       NewBlock = (PCELL_HEADER) ((ULONG_PTR) NewBlock + CellSize);
       NewBlock->CellSize = ((PCELL_HEADER) (*Block))->CellSize - CellSize;
     {
       NewBlock = (PCELL_HEADER) ((ULONG_PTR) NewBlock + CellSize);
       NewBlock->CellSize = ((PCELL_HEADER) (*Block))->CellSize - CellSize;
+      ((PCELL_HEADER) (*Block))->CellSize = CellSize;
       CmiAddFree (RegistryHive,
                  NewBlock,
                  *pBlockOffset + CellSize,
       CmiAddFree (RegistryHive,
                  NewBlock,
                  *pBlockOffset + CellSize,