From 57fb55b68603af99cee1d411e0e252b7174faa68 Mon Sep 17 00:00:00 2001 From: Jeffrey Quesnelle Date: Fri, 24 Jan 2020 13:32:35 -0500 Subject: [PATCH] fix uninitialized memory which may cause Windows to not properly enumerate devices --- platform/windows/registry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/windows/registry.cpp b/platform/windows/registry.cpp index 33e8274..59c7b1b 100644 --- a/platform/windows/registry.cpp +++ b/platform/windows/registry.cpp @@ -94,7 +94,7 @@ bool Registry::Get(std::wstring path, std::wstring key, uint32_t& value) { return false; // 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); if(ret != ERROR_SUCCESS || type != REG_DWORD) return false;