#include "wx/intl.h"
#include "wx/log.h"
#include "wx/utils.h"
+ #include "wx/hashmap.h"
#endif
#include "wx/strconv.h"
size_t dstLen = FromWChar(NULL, 0, inBuff, inLen);
if ( dstLen != wxCONV_FAILED )
{
- if ( !dstLen )
- {
- // special case: can't allocate 0 size buffer below
- dstLen++;
- }
-
- wxCharBuffer buf(dstLen - 1);
+ // special case of empty input: can't allocate 0 size buffer below as
+ // wxCharBuffer insists on NUL-terminating it
+ wxCharBuffer buf(dstLen ? dstLen - 1 : 1);
if ( FromWChar(buf.data(), dstLen, inBuff, inLen) != wxCONV_FAILED )
{
if ( outLen )
}
wxMBConv_win32(const wxMBConv_win32& conv)
+ : wxMBConv()
{
m_CodePage = conv.m_CodePage;
m_minMBCharWidth = conv.m_minMBCharWidth;
}
#if wxUSE_FONTMAP
-#include "wx/hashmap.h"
WX_DECLARE_HASH_MAP( wxFontEncoding, wxString, wxIntegerHash, wxIntegerEqual,
wxEncodingNameCache );