mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[WIN32SS:NTUSER] Remove some hardcoded buffer sizes + number of chars vs. bytes mixup.
This commit is contained in:
parent
cc3fbfefac
commit
fb4a6e38c7
1 changed files with 3 additions and 3 deletions
|
@ -169,7 +169,7 @@ InitVideo(VOID)
|
|||
Status = RegOpenKey(L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control", &hkey);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
cbValue = 256;
|
||||
cbValue = sizeof(awcBuffer);
|
||||
Status = RegQueryValue(hkey, L"SystemStartOptions", REG_SZ, awcBuffer, &cbValue);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -193,11 +193,11 @@ InitVideo(VOID)
|
|||
}
|
||||
|
||||
/* Read the name of the VGA adapter */
|
||||
cbValue = 20;
|
||||
cbValue = sizeof(awcDeviceName);
|
||||
Status = RegQueryValue(hkey, L"VgaCompatible", REG_SZ, awcDeviceName, &cbValue);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
iVGACompatible = _wtoi(&awcDeviceName[13]);
|
||||
iVGACompatible = _wtoi(&awcDeviceName[sizeof("\\Device\\Video")-1]);
|
||||
ERR("VGA adapter = %lu\n", iVGACompatible);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue