mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 17:58:20 +00:00
DIagnostics: Strengthened check
This commit is contained in:
parent
4c10faa852
commit
383146a5c4
@ -145,7 +145,8 @@ void CatchUnhandled(int sig) {
|
||||
std::string functionName = strings[i];
|
||||
std::string::size_type start = functionName.find('(');
|
||||
std::string::size_type end = functionName.find('+');
|
||||
if (start != std::string::npos && end != std::string::npos) {
|
||||
// strengthened check
|
||||
if (start != std::string::npos && start + 1 < functionName.size() && end != std::string::npos && start < end) {
|
||||
std::string demangled = functionName.substr(start + 1, end - start - 1);
|
||||
|
||||
demangled = Demangler::Demangle(demangled.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user