mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:42:56 +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:
parent
3c89dc696e
commit
6a2986170b
1 changed files with 4 additions and 4 deletions
|
@ -278,7 +278,7 @@ CmiAddSubKey(
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
Storage = (CreateOptions & REG_OPTION_VOLATILE) ? Volatile : Stable;
|
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);
|
NKBOffset = HvAllocateCell(&RegistryHive->Hive, NewBlockSize, Storage, HCELL_NIL);
|
||||||
if (NKBOffset == HCELL_NIL)
|
if (NKBOffset == HCELL_NIL)
|
||||||
{
|
{
|
||||||
|
@ -450,7 +450,7 @@ CmiCompareKeyNames(
|
||||||
|
|
||||||
for (i = 0; i < KeyCell->NameLength; i++)
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -488,8 +488,8 @@ CmiCompareKeyNamesI(
|
||||||
/* FIXME: use _strnicmp */
|
/* FIXME: use _strnicmp */
|
||||||
for (i = 0; i < KeyCell->NameLength; i++)
|
for (i = 0; i < KeyCell->NameLength; i++)
|
||||||
{
|
{
|
||||||
if (RtlUpcaseUnicodeChar(((PCHAR)KeyName->Buffer)[i]) !=
|
if (RtlUpcaseUnicodeChar(KeyName->Buffer[i]) !=
|
||||||
RtlUpcaseUnicodeChar((WCHAR)KeyCell->Name[i]))
|
RtlUpcaseUnicodeChar(((PCHAR)KeyCell->Name)[i]))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue