mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Fix off-by-one (found by lispbub, #43).
This commit is contained in:
parent
d1ef8ea90b
commit
0744355a67
@ -160,7 +160,7 @@ TRACY_API void SetThreadName( const char* name )
|
||||
const auto sz = strlen( name );
|
||||
char* buf = (char*)tracy_malloc( sz+1 );
|
||||
memcpy( buf, name, sz );
|
||||
buf[sz+1] = '\0';
|
||||
buf[sz] = '\0';
|
||||
auto data = (ThreadNameData*)tracy_malloc( sizeof( ThreadNameData ) );
|
||||
data->id = detail::GetThreadHandleImpl();
|
||||
data->name = buf;
|
||||
|
Loading…
Reference in New Issue
Block a user