Do not try to demangle really long function names.

This commit is contained in:
Bartosz Taudul 2022-07-23 12:37:00 +02:00
parent d282425287
commit a75846dd88
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -83,6 +83,7 @@ void ___tracy_free_demangle_buffer()
extern "C" const char* ___tracy_demangle( const char* mangled )
{
if( !mangled || mangled[0] != '_' ) return nullptr;
if( strlen( mangled ) > ___tracy_demangle_buffer_len ) return nullptr;
int status;
size_t len = ___tracy_demangle_buffer_len;
return abi::__cxa_demangle( mangled, ___tracy_demangle_buffer, &len, &status );