diff --git a/Src/Common/MWR/SecureString.hpp b/Src/Common/MWR/SecureString.hpp index dfe47d4..4c7129d 100644 --- a/Src/Common/MWR/SecureString.hpp +++ b/Src/Common/MWR/SecureString.hpp @@ -85,7 +85,13 @@ namespace std basic_string, MWR::SecureAllocator>::~basic_string() { // Clear internal buffer if SSO is in effect +#if _MSC_VER >= 1920 // v142 toolset + auto& _My_data = _Mypair._Myval2; +#elif _MSC_VER >= 1910 // v141 toolset auto& _My_data = this->_Get_data(); +#elif +#error Unsupported toolset +#endif if (!_My_data._Large_string_engaged()) SecureZeroMemory(_My_data._Bx._Buf, sizeof _My_data._Bx._Buf); @@ -104,7 +110,13 @@ namespace std basic_string, MWR::SecureAllocator>::~basic_string() { // Clear internal buffer if SSO is in effect +#if _MSC_VER >= 1920 // v142 toolset + auto& _My_data = _Mypair._Myval2; +#elif _MSC_VER >= 1910 // v141 toolset auto& _My_data = this->_Get_data(); +#elif +#error Unsupported toolset +#endif if (!_My_data._Large_string_engaged()) SecureZeroMemory(_My_data._Bx._Buf, sizeof _My_data._Bx._Buf);