From 821783d809b1ef5a6aac0353cf1f283c42eb3f1a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 16 Jan 2020 01:04:38 +0300 Subject: SymbolInfo: get rid of a dangerous hack --- src/symbol.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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(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{} { -- cgit v1.2.3