mirror of
https://github.com/boostorg/serialization.git
synced 2026-02-24 04:12:28 +00:00
explicitly initialized m_mbs (std::mbstate_t) in utf8 transform iterators.
adjusted tests to be sure that wchar arrays/strings are null terminated.
This commit is contained in:
@@ -116,6 +116,7 @@ public:
|
||||
template<class T>
|
||||
mb_from_wchar(T start) :
|
||||
super_t(Base(static_cast< T >(start))),
|
||||
m_mbs(std::mbstate_t()),
|
||||
m_bend(0),
|
||||
m_bnext(0),
|
||||
m_full(false)
|
||||
|
||||
@@ -124,8 +124,10 @@ public:
|
||||
// make composible buy using templated constructor
|
||||
template<class T>
|
||||
wchar_from_mb(T start) :
|
||||
super_t(Base(static_cast< T >(start)))
|
||||
super_t(Base(static_cast< T >(start))),
|
||||
m_mbs(std::mbstate_t())
|
||||
{
|
||||
BOOST_ASSERT(std::mbsinit(&m_mbs));
|
||||
drain();
|
||||
}
|
||||
// copy ctor
|
||||
|
||||
Reference in New Issue
Block a user