From 27ac89547dbe4986d3d153ce8dcea449ed67f504 Mon Sep 17 00:00:00 2001 From: xyz1001 Date: Thu, 7 Sep 2023 11:29:43 +0800 Subject: [PATCH] Fix wrong check for wcstombs return value --- public/common/TracySystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/common/TracySystem.cpp b/public/common/TracySystem.cpp index 2a7d997e..05a16c43 100644 --- a/public/common/TracySystem.cpp +++ b/public/common/TracySystem.cpp @@ -222,7 +222,7 @@ TRACY_API const char* GetThreadName( uint32_t id ) _GetThreadDescription( hnd, &tmp ); auto ret = wcstombs( buf, tmp, 256 ); CloseHandle( hnd ); - if( ret != 0 ) + if( ret != static_cast(-1) ) { return buf; }