From 9b88d41169ef2dc904f253c3564d44778bd072cd Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 28 Jan 2020 21:44:39 +0100 Subject: [PATCH] - fixed compile errors. --- source/common/searchpaths.cpp | 2 +- source/platform/win32/i_system.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/common/searchpaths.cpp b/source/common/searchpaths.cpp index 69256862b..56b1b8c09 100644 --- a/source/common/searchpaths.cpp +++ b/source/common/searchpaths.cpp @@ -129,7 +129,7 @@ void G_AddExternalSearchPaths(TArray &searchpaths) { // 3D Realms Anthology char buf[PATH_MAX]; - DWORD bufsize = sizeof(buf); + size_t bufsize = sizeof(buf); if (I_ReadRegistryValue(entry.regPath, entry.regKey, buf, &bufsize)) { if (!entry.subpaths) AddSearchPath(searchpaths, buf); diff --git a/source/platform/win32/i_system.cpp b/source/platform/win32/i_system.cpp index ac66e8a49..f020e100d 100644 --- a/source/platform/win32/i_system.cpp +++ b/source/platform/win32/i_system.cpp @@ -1311,7 +1311,9 @@ int I_ReadRegistryValue(char const * const SubKey, char const * const Value, cha if (keygood != ERROR_SUCCESS) continue; - LONG retval = SHGetValueA(hkey, SubKey, Value, NULL, Output, OutputSize); + DWORD os = 0; + LONG retval = SHGetValueA(hkey, SubKey, Value, NULL, Output, &os); + *OutputSize = os; RegCloseKey(hkey); @@ -1321,4 +1323,3 @@ int I_ReadRegistryValue(char const * const SubKey, char const * const Value, cha return 0; } -#endif