From f099a3358e2c6c788d33ef46abcef13b16e46c53 Mon Sep 17 00:00:00 2001 From: Trent Houliston Date: Fri, 22 Sep 2023 14:43:53 +1000 Subject: [PATCH] Fix windows demangle --- src/util/demangle.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/demangle.cpp b/src/util/demangle.cpp index fd6ed6480..6af2b8a5b 100644 --- a/src/util/demangle.cpp +++ b/src/util/demangle.cpp @@ -62,8 +62,12 @@ namespace util { } std::string demangle(const char* symbol) { + // If the symbol is null then just return an empty string + if (symbol == nullptr) { + return ""; + } // If the symbol is the empty string then just return it - if (symbol != nullptr && symbol[0] == '\0') { + if (symbol[0] == '\0') { return symbol; }