diff --git a/include/boost/stacktrace/detail/frame_msvc.ipp b/include/boost/stacktrace/detail/frame_msvc.ipp index 59dcd32..1f4570e 100644 --- a/include/boost/stacktrace/detail/frame_msvc.ipp +++ b/include/boost/stacktrace/detail/frame_msvc.ipp @@ -236,12 +236,17 @@ public: return result; } - // If 'delimiter' is equal to 'std::string::npos' then we have only module name. const std::size_t delimiter = result.find_first_of('!'); if (module_name) { *module_name = result.substr(0, delimiter); } + if (delimiter == std::string::npos) { + // If 'delimiter' is equal to 'std::string::npos' then we have only module name. + result.clear(); + return result; + } + result = minwg_demangling_workaround( result.substr(delimiter + 1) );