diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Host/windows/HostInfoWindows.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Host/windows/HostInfoWindows.cpp b/lldb/source/Host/windows/HostInfoWindows.cpp index 8cd8f2d2fc5..459703ff0ed 100644 --- a/lldb/source/Host/windows/HostInfoWindows.cpp +++ b/lldb/source/Host/windows/HostInfoWindows.cpp @@ -95,6 +95,8 @@ bool HostInfoWindows::GetHostname(std::string &s) { if (!::GetComputerNameW(buffer, &dwSize)) return false; + // The conversion requires an empty string. + s.clear(); return llvm::convertWideToUTF8(buffer, s); } |