mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
fix uninitialized memory which may cause Windows to not properly enumerate devices
This commit is contained in:
@@ -94,7 +94,7 @@ bool Registry::Get(std::wstring path, std::wstring key, uint32_t& value) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Query for the data
|
// Query for the data
|
||||||
DWORD type, size, kvalue;
|
DWORD type, size = sizeof(DWORD), kvalue;
|
||||||
auto ret = RegQueryValueExW(regKey.GetKey(), key.c_str(), nullptr, &type, (LPBYTE)&kvalue, &size);
|
auto ret = RegQueryValueExW(regKey.GetKey(), key.c_str(), nullptr, &type, (LPBYTE)&kvalue, &size);
|
||||||
if(ret != ERROR_SUCCESS || type != REG_DWORD)
|
if(ret != ERROR_SUCCESS || type != REG_DWORD)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user