September 11, 2008 Debug-build faulty assertion with winstl/system/system_traits.hpp | ||||
---|---|---|---|---|
| ||||
Hi. Found a debug-build issue with system_traits.hpp in that it asserts incorrectly when part of WinSTL is trying to get the necessary size of a buffer. See the patch below. ==== //depot/agent/main/ThirdPartySource/stlsoft/include/winstl/system/system_traits.hpp#8 (text) - //depot/agent/main/ThirdPartySource/stlsoft/include/winstl/system/system_traits.hpp#9 (text) ==== content @@ -544,7 +544,7 @@ static size_type expand_environment_strings(char_type const* src, char_type* dest, size_type cch_dest) { WINSTL_ASSERT(NULL != src); - WINSTL_ASSERT(NULL != dest); + WINSTL_ASSERT(NULL != dest || 0 == cch_dest); return class_type::ExpandEnvironmentStringsA(src, dest, cch_dest); } @@ -881,7 +881,7 @@ static size_type expand_environment_strings(char_type const* src, char_type* dest, size_type cch_dest) { WINSTL_ASSERT(NULL != src); - WINSTL_ASSERT(NULL != dest); + WINSTL_ASSERT(NULL != dest || 0 == cch_dest); return class_type::ExpandEnvironmentStringsW(src, dest, cch_dest); } -austin |
September 12, 2008 Re: Debug-build faulty assertion with winstl/system/system_traits.hpp | ||||
---|---|---|---|---|
| ||||
Posted in reply to Austin Ziegler | Thanks for that. This is now fixed, and will be in the next release. "Austin Ziegler" <austin.ziegler@evault.com> wrote in message news:gac02c$fil$1@digitalmars.com... > Hi. > > Found a debug-build issue with system_traits.hpp in that it asserts incorrectly when part of WinSTL is trying to get the necessary size of a buffer. See the patch below. > > ==== //depot/agent/main/ThirdPartySource/stlsoft/include/winstl/system/system_traits.hpp#8 (text) - //depot/agent/main/ThirdPartySource/stlsoft/include/winstl/system/system_traits.hpp#9 (text) ==== content > @@ -544,7 +544,7 @@ > static size_type expand_environment_strings(char_type const* src, char_type* dest, size_type cch_dest) > { > WINSTL_ASSERT(NULL != src); > - WINSTL_ASSERT(NULL != dest); > + WINSTL_ASSERT(NULL != dest || 0 == cch_dest); > > return class_type::ExpandEnvironmentStringsA(src, dest, cch_dest); > } > @@ -881,7 +881,7 @@ > static size_type expand_environment_strings(char_type const* src, char_type* dest, size_type cch_dest) > { > WINSTL_ASSERT(NULL != src); > - WINSTL_ASSERT(NULL != dest); > + WINSTL_ASSERT(NULL != dest || 0 == cch_dest); > > return class_type::ExpandEnvironmentStringsW(src, dest, cch_dest); > } > > -austin |
Copyright © 1999-2021 by the D Language Foundation