fix windows build error

This commit is contained in:
Arvid Norberg 2014-06-27 02:04:37 +00:00
parent 91a22d48c3
commit c76e8189a6
1 changed files with 1 additions and 1 deletions

View File

@ -603,7 +603,7 @@ namespace libtorrent
ws.resize(s.size() + 1);
std::size_t size = MultiByteToWideChar(CP_ACP, 0, s.c_str(), -1, &ws[0], ws.size());
if (size == std::size_t(-1)) return s;
if (size != 0 && ret[size - 1] == '\0') --size;
if (size != 0 && ws[size - 1] == '\0') --size;
ws.resize(size);
std::string ret;
libtorrent::wchar_utf8(ws, ret);