mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Fixes #199 ('"Missing/misused m_is_wide in char_wchar_holder assignment operators").
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user