diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-16 01:04:38 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-16 01:21:32 +0300 |
commit | 821783d809b1ef5a6aac0353cf1f283c42eb3f1a (patch) | |
tree | ceed12671c959befca81e1efb0911a74204ec7ab /src/symbol.cpp | |
parent | add call stack collection support (diff) | |
download | winapi-debug-821783d809b1ef5a6aac0353cf1f283c42eb3f1a.tar.gz winapi-debug-821783d809b1ef5a6aac0353cf1f283c42eb3f1a.zip |
SymbolInfo: get rid of a dangerous hack
Diffstat (limited to 'src/symbol.cpp')
-rw-r--r-- | src/symbol.cpp | 6 |
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{} { |