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