Fix splitting of cells (noticed by Hartmut).
[reactos.git] / reactos / boot / freeldr / freeldr / reactos / 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;
+      ((PCELL_HEADER) (*Block))->CellSize = CellSize;
       CmiAddFree (RegistryHive,
                  NewBlock,
                  *pBlockOffset + CellSize,