diff options
Diffstat (limited to 'win/rfb_win32/Registry.cxx')
-rw-r--r-- | win/rfb_win32/Registry.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win/rfb_win32/Registry.cxx b/win/rfb_win32/Registry.cxx index 3b12dab9..bcb98704 100644 --- a/win/rfb_win32/Registry.cxx +++ b/win/rfb_win32/Registry.cxx @@ -244,11 +244,11 @@ std::string RegKey::getRepresentation(const char* valname) const { DWORD required = ExpandEnvironmentStrings(str.c_str(), nullptr, 0); if (required==0) throw rdr::SystemException("ExpandEnvironmentStrings", GetLastError()); - std::vector<char> result(required); - length = ExpandEnvironmentStrings(str.c_str(), result.data(), required); + std::vector<char> expanded(required); + length = ExpandEnvironmentStrings(str.c_str(), expanded.data(), required); if (required<length) throw rdr::Exception("unable to expand environment strings"); - return result.data(); + return expanded.data(); } else { return ""; } |