mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Chomp newline from end of thread string.
This commit is contained in:
parent
d664b93ae0
commit
94b470ba66
@ -181,7 +181,13 @@ const char* GetThreadName( uint64_t id )
|
|||||||
if ( ( fd = open( path, O_RDONLY ) ) > 0) {
|
if ( ( fd = open( path, O_RDONLY ) ) > 0) {
|
||||||
int len = read( fd, buf, 255 );
|
int len = read( fd, buf, 255 );
|
||||||
if( len > 0 )
|
if( len > 0 )
|
||||||
|
{
|
||||||
buf[len] = 0;
|
buf[len] = 0;
|
||||||
|
if( len > 1 && buf[len-1] == '\n' )
|
||||||
|
{
|
||||||
|
buf[len-1] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
close( fd );
|
close( fd );
|
||||||
}
|
}
|
||||||
# ifndef __ANDROID__
|
# ifndef __ANDROID__
|
||||||
|
Loading…
Reference in New Issue
Block a user