Set the value/data cell to dirty, if an existing value is overwritten.
authorHartmut Birr <osexpert@googlemail.com>
Thu, 17 Nov 2005 17:34:22 +0000 (17:34 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Thu, 17 Nov 2005 17:34:22 +0000 (17:34 +0000)
svn path=/trunk/; revision=19295

reactos/ntoskrnl/cm/ntfunc.c

index 57d5761..e506b34 100644 (file)
@@ -1993,7 +1993,6 @@ NtSetValueKey(IN HANDLE KeyHandle,
       RtlCopyMemory(&ValueCell->DataOffset, Data, DataSize);
       ValueCell->DataSize = DataSize | REG_DATA_IN_OFFSET;
       ValueCell->DataType = Type;
-      RtlMoveMemory(&ValueCell->DataOffset, Data, DataSize);
       CmiMarkBlockDirty(RegistryHive, ValueCellOffset);
     }
   else if (!(ValueCell->DataSize & REG_DATA_IN_OFFSET) &&
@@ -2005,6 +2004,8 @@ NtSetValueKey(IN HANDLE KeyHandle,
       RtlCopyMemory(DataCell->Data, Data, DataSize);
       ValueCell->DataSize = DataSize;
       ValueCell->DataType = Type;
+      CmiMarkBlockDirty(RegistryHive, ValueCell->DataOffset);
+      CmiMarkBlockDirty(RegistryHive, ValueCellOffset);
     }
   else
     {