Fix return value of wxMBConvUTF8::ToWChar() when not using MAP_INVALID_UTF8_NOT.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 14 Aug 2011 19:39:31 +0000 (19:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 14 Aug 2011 19:39:31 +0000 (19:39 +0000)
commitf4cb7c58da30c8dde304bb7c3b83af3ddba6c9c2
tree289dbe8f5243537fb9ad90d0d21c3fb1e9bbe797
parent6a0d7a989c5e58d434badd69a9bb16bde8dcd0c0
Fix return value of wxMBConvUTF8::ToWChar() when not using MAP_INVALID_UTF8_NOT.

wxMBConvUTF8::ToWChar() was off by 1 when the input length was explicitly
specified, the extra NUL should only be added in the implicit length case.

This bug didn't occur for the default wxMBConvUTF8 object as it simply
forwarded to the base class wxMBConvStrictUTF8 implementation but it happened
when MAP_INVALID_UTF8_TO_OCTAL or MAP_INVALID_UTF8_TO_PUA was used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/strconv.cpp