diff --git a/reactos/tools/mkhive/registry.c b/reactos/tools/mkhive/registry.c index d9cb3625501..c224b475dbf 100644 --- a/reactos/tools/mkhive/registry.c +++ b/reactos/tools/mkhive/registry.c @@ -133,7 +133,9 @@ RegpOpenOrCreateKey( RtlInitUnicodeString(&KeyString, LocalKeyName); /* Redirect from 'CurrentControlSet' to 'ControlSet001' */ - if (!wcsncmp(LocalKeyName, L"CurrentControlSet", 17)) + if (!wcsncmp(LocalKeyName, L"CurrentControlSet", 17) && + ParentKey->NameSize == 12 && + !memcmp(ParentKey->Name, L"SYSTEM", 12)) RtlInitUnicodeString(&KeyString, L"ControlSet001"); /* Check subkey in memory structure */