mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +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 );
|
const auto sz = strlen( name );
|
||||||
char* buf = (char*)tracy_malloc( sz+1 );
|
char* buf = (char*)tracy_malloc( sz+1 );
|
||||||
memcpy( buf, name, sz );
|
memcpy( buf, name, sz );
|
||||||
buf[sz+1] = '\0';
|
buf[sz] = '\0';
|
||||||
auto data = (ThreadNameData*)tracy_malloc( sizeof( ThreadNameData ) );
|
auto data = (ThreadNameData*)tracy_malloc( sizeof( ThreadNameData ) );
|
||||||
data->id = detail::GetThreadHandleImpl();
|
data->id = detail::GetThreadHandleImpl();
|
||||||
data->name = buf;
|
data->name = buf;
|
||||||
|
Loading…
Reference in New Issue
Block a user