From 10b3c9e5a8ce46cfbc3c80042fcaf6079f6a8a34 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 24 Mar 2020 19:22:40 +0300 Subject: add some unit tests --- src/symbol.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/symbol.cpp b/src/symbol.cpp index 3b0f5d9..d51cc83 100644 --- a/src/symbol.cpp +++ b/src/symbol.cpp @@ -57,7 +57,9 @@ SymbolInfo::SymbolInfo(const Impl& impl) : SymbolInfo{} { } std::string SymbolInfo::get_name() const { - return boost::nowide::narrow(std::wstring{get_impl().Name, get_impl().NameLen}); + // SymFromAddrW, contrary to SymFromAddrA, seems to include the terminating + // null character in NameLen. + return boost::nowide::narrow(get_impl().Name); } LineInfo::LineInfo(const Impl& impl) -- cgit v1.2.3