mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 16:54:35 +00:00
Don't assign const char ptr to char ptr.
This commit is contained in:
parent
6c9add0f30
commit
45cec65eef
@ -73,22 +73,24 @@ CallstackEntry DecodeCallstackPtr( uint64_t ptr )
|
|||||||
|
|
||||||
ret.name = name;
|
ret.name = name;
|
||||||
|
|
||||||
|
const char* filename;
|
||||||
IMAGEHLP_LINE64 line;
|
IMAGEHLP_LINE64 line;
|
||||||
unsigned long displacement = 0;
|
unsigned long displacement = 0;
|
||||||
line.SizeOfStruct = sizeof( IMAGEHLP_LINE64 );
|
line.SizeOfStruct = sizeof( IMAGEHLP_LINE64 );
|
||||||
if( SymGetLineFromAddr64( proc, ptr, &displacement, &line ) == 0 )
|
if( SymGetLineFromAddr64( proc, ptr, &displacement, &line ) == 0 )
|
||||||
{
|
{
|
||||||
line.FileName = "[unknown]";
|
filename = "[unknown]";
|
||||||
ret.line = 0;
|
ret.line = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
filename = line.FileName;
|
||||||
ret.line = line.LineNumber;
|
ret.line = line.LineNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto fsz = strlen( line.FileName );
|
const auto fsz = strlen( filename );
|
||||||
auto file = (char*)tracy_malloc( fsz + 1 );
|
auto file = (char*)tracy_malloc( fsz + 1 );
|
||||||
memcpy( file, line.FileName, fsz );
|
memcpy( file, filename, fsz );
|
||||||
file[fsz] = '\0';
|
file[fsz] = '\0';
|
||||||
|
|
||||||
ret.file = file;
|
ret.file = file;
|
||||||
|
Loading…
Reference in New Issue
Block a user