diff --git a/include/boost/stacktrace/detail/backend_windows.hpp b/include/boost/stacktrace/detail/backend_windows.hpp index 807631d..45adeb0 100644 --- a/include/boost/stacktrace/detail/backend_windows.hpp +++ b/include/boost/stacktrace/detail/backend_windows.hpp @@ -14,6 +14,7 @@ #include #include +#include #include #include "Dbgeng.h" @@ -135,9 +136,10 @@ inline std::string get_name_impl(const com_holder& idebug, const if (!res) { result.clear(); + return result; } - const std::size_t delimiter = res.find_first_of('!'); + const std::size_t delimiter = result.find_first_of('!'); if (delimiter == std::string::npos) { return result; } @@ -218,7 +220,7 @@ std::string backend::to_string(const void* addr) { res += " at "; res += source_line.first; res += ':'; - res += boost::lexical_cast(file_line.second); + res += boost::lexical_cast >(file_line.second).data(); } else if (!module_name.empty()) { res += " in "; res += module_name;