mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 19:26:16 +00:00
- Fix my mistakes when changing type of the Name field. LiveCD / make install_registry now works again.
- Convert one more sizeof to FIELD_OFFSET (though sizeof() was operating properly in this particular case). See issue #2780 for more details. svn path=/trunk/; revision=29985
This commit is contained in:
@@ -278,7 +278,7 @@ CmiAddSubKey(
|
||||
Status = STATUS_SUCCESS;
|
||||
|
||||
Storage = (CreateOptions & REG_OPTION_VOLATILE) ? Volatile : Stable;
|
||||
NewBlockSize = sizeof(CM_KEY_NODE) + NameLength;
|
||||
NewBlockSize = FIELD_OFFSET(CM_KEY_NODE, Name) + NameLength;
|
||||
NKBOffset = HvAllocateCell(&RegistryHive->Hive, NewBlockSize, Storage, HCELL_NIL);
|
||||
if (NKBOffset == HCELL_NIL)
|
||||
{
|
||||
@@ -450,7 +450,7 @@ CmiCompareKeyNames(
|
||||
|
||||
for (i = 0; i < KeyCell->NameLength; i++)
|
||||
{
|
||||
if (((PCHAR)KeyName->Buffer)[i] != (WCHAR)KeyCell->Name[i])
|
||||
if (KeyName->Buffer[i] != ((PCHAR)KeyCell->Name)[i])
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -488,8 +488,8 @@ CmiCompareKeyNamesI(
|
||||
/* FIXME: use _strnicmp */
|
||||
for (i = 0; i < KeyCell->NameLength; i++)
|
||||
{
|
||||
if (RtlUpcaseUnicodeChar(((PCHAR)KeyName->Buffer)[i]) !=
|
||||
RtlUpcaseUnicodeChar((WCHAR)KeyCell->Name[i]))
|
||||
if (RtlUpcaseUnicodeChar(KeyName->Buffer[i]) !=
|
||||
RtlUpcaseUnicodeChar(((PCHAR)KeyCell->Name)[i]))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user