diff --git a/doc/interprocess.qbk b/doc/interprocess.qbk index af6c2ba5..0344ab4c 100644 --- a/doc/interprocess.qbk +++ b/doc/interprocess.qbk @@ -6778,8 +6778,11 @@ thank them: You can obtain the pre-Boost 1.87 ABI #defining `BOOST_INTERPROCESS_SEGMENT_MANAGER_ABI` to `1` before including Boost.Interprocess headers. * Fixed bugs: - * [@https://github.com/boostorg/interprocess/issues/210 GitHub #210 (['"Bug in boost::interprocess::ipcdetail::sync_handles::obtain_mutex"])]. * [@https://github.com/boostorg/interprocess/issues/192 GitHub #192 (['"managed_windows_shared_memory crash on destruction"])]. + * [@https://github.com/boostorg/interprocess/issues/199 GitHub #199 (['"missing/misused m_is_wide in char_wchar_holder assignment operators"])]. + * [@https://github.com/boostorg/interprocess/issues/210 GitHub #210 (['"Bug in boost::interprocess::ipcdetail::sync_handles::obtain_mutex"])]. + * [@https://github.com/boostorg/interprocess/issues/215 GitHub #215 (['"Alignment problem with boost/interprocess/segment_manager on SPARC 32Bit"])]. + [endsect] diff --git a/include/boost/interprocess/detail/char_wchar_holder.hpp b/include/boost/interprocess/detail/char_wchar_holder.hpp index 8831aa20..0c078715 100644 --- a/include/boost/interprocess/detail/char_wchar_holder.hpp +++ b/include/boost/interprocess/detail/char_wchar_holder.hpp @@ -57,6 +57,7 @@ class char_wchar_holder this->delete_mem(); m_str.n = tmp; std::strcpy(m_str.n, nstr); + m_is_wide = false; return *this; } @@ -66,15 +67,16 @@ class char_wchar_holder this->delete_mem(); m_str.w = tmp; std::wcscpy(m_str.w, wstr); + m_is_wide = true; return *this; } char_wchar_holder& operator=(const char_wchar_holder &other) { if (other.m_is_wide) - *this = other.getn(); - else *this = other.getw(); + else + *this = other.getn(); return *this; }