aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-16 01:04:38 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-16 01:21:32 +0300
commit821783d809b1ef5a6aac0353cf1f283c42eb3f1a (patch)
treeceed12671c959befca81e1efb0911a74204ec7ab /src
parentadd call stack collection support (diff)
downloadwinapi-debug-821783d809b1ef5a6aac0353cf1f283c42eb3f1a.tar.gz
winapi-debug-821783d809b1ef5a6aac0353cf1f283c42eb3f1a.zip
SymbolInfo: get rid of a dangerous hack
Diffstat (limited to 'src')
-rw-r--r--src/symbol.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/symbol.cpp b/src/symbol.cpp
index 98ec427..4c271c0 100644
--- a/src/symbol.cpp
+++ b/src/symbol.cpp
@@ -36,10 +36,10 @@ unsigned long cast_line_number(DWORD impl) {
} // namespace
-SymbolInfo::SymbolInfo() : buffer{}, impl{*reinterpret_cast<Impl*>(buffer.data())} {
+SymbolInfo::SymbolInfo() {
buffer.fill(0);
- impl.SizeOfStruct = sizeof(Impl);
- impl.MaxNameLen = MAX_SYM_NAME;
+ get_impl().SizeOfStruct = sizeof(Impl);
+ get_impl().MaxNameLen = MAX_SYM_NAME;
}
SymbolInfo::SymbolInfo(const Impl& impl) : SymbolInfo{} {