From 13805ccfdc833efd03bd0b2d025687e1bc7d433b Mon Sep 17 00:00:00 2001 From: Krzysztof Swiecicki Date: Tue, 18 Jul 2023 12:45:28 +0200 Subject: [PATCH] Fix GetEnvironmentVariable encoding --- source/common/ur_util.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/ur_util.hpp b/source/common/ur_util.hpp index e77d439275..54617d7c87 100644 --- a/source/common/ur_util.hpp +++ b/source/common/ur_util.hpp @@ -92,7 +92,7 @@ inline std::optional ur_getenv(const char *name) { #if defined(_WIN32) constexpr int buffer_size = 1024; char buffer[buffer_size]; - auto rc = GetEnvironmentVariable(name, buffer, buffer_size); + auto rc = GetEnvironmentVariableA(name, buffer, buffer_size); if (0 != rc && rc < buffer_size) { return std::string(buffer); } else if (rc >= buffer_size) {