Subject: [Boost-bugs] [Boost C++ Libraries] #11915: Bug in xml_iarchive_impl<Archive>::load(std::wstring &ws)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-01-15 11:06:09
#11915: Bug in xml_iarchive_impl<Archive>::load(std::wstring &ws)
------------------------------+---------------------------
Reporter: anonymous | Owner: ramey
Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
Version: Boost 1.61.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------
There is a problem when serialization calls
{{{
xml_iarchive_impl<Archive>::load(wchar_t * ws)
}}}
or
{{{
xml_iarchive_impl<Archive>::load(std::wstring &ws)
}}}
in Visual Studio VC 2010.
When std::mbrtowc is called in this function needs that "std::mbstate_t
mbs" must be initialized to "std::mbstate_t()" in its first loop.
Current value is undefined in this platform because mbstate_t is only an
int (typedef int mbstate_t). It should be initialized before you use.
My proposed fix should be:
{{{
std::mbstate_t mbs = std::mbstate_t();
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11915> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC