*** empty log message ***

This commit is contained in:
Arvid Norberg 2005-07-01 13:25:25 +00:00
parent 5f6f6ef9a3
commit 4f156874ab
1 changed files with 3 additions and 2 deletions

View File

@ -61,9 +61,10 @@ namespace
libtorrent::utf8_wchar(s, ws);
std::size_t size = wcstombs(0, ws.c_str(), 0);
if (size == std::size_t(-1)) return s;
std::string ret(size + 1);
std::string ret;
ret.resize(size);
size = wcstombs(&ret[0], ws.c_str(), size + 1);
ret.resize(size - 1);
ret.resize(size);
return ret;
}