Ticket #11057: string_conversions.patch
File string_conversions.patch, 745 bytes (added by , 8 years ago) |
---|
-
libfilezilla_svn/lib/string.cpp
90 90 std::wstring ret; 91 91 92 92 char const* in_p = in.c_str(); 93 size_t len = std::mbsrtowcs( 0, &in_p, 0, &ps);93 size_t len = std::mbsrtowcs(nullptr, &in_p, -1, &ps); 94 94 if (len != static_cast<size_t>(-1)) { 95 95 ret.resize(len); 96 96 wchar_t* out_p = &ret[0]; … … 205 205 std::string ret; 206 206 207 207 wchar_t const* in_p = in.c_str(); 208 size_t len = std::wcsrtombs( 0, &in_p, 0, &ps);208 size_t len = std::wcsrtombs(nullptr, &in_p, -1, &ps); 209 209 if (len != static_cast<size_t>(-1)) { 210 210 ret.resize(len); 211 211 char* out_p = &ret[0];