Skip to content

Commit 23abc04

Browse files
committed
Clear thread name container before writing UTF8 bytes
1 parent c87dc2b commit 23abc04

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ const char *TargetThreadWindows::GetName() {
192192
if (SUCCEEDED(GetThreadDescription(
193193
m_host_thread.GetNativeThread().GetSystemHandle(), &pszThreadName))) {
194194
LLDB_LOGF(log, "GetThreadDescription: %ls", pszThreadName);
195+
m_name.clear();
195196
llvm::convertUTF16ToUTF8String(
196197
llvm::ArrayRef(reinterpret_cast<char *>(pszThreadName),
197198
wcslen(pszThreadName) * sizeof(wchar_t)),

0 commit comments

Comments
 (0)