fixed file allocation issue on linux. fixed filname encoding issue with iconv()

This commit is contained in:
Arvid Norberg
2010-10-18 07:15:57 +00:00
parent 2ccf08e9b5
commit 7aa9352dd0
4 changed files with 45 additions and 20 deletions

View File

@@ -658,7 +658,9 @@ namespace libtorrent
if (insize != 0) return s;
// not sure why this would happen, but it seems to be possible
if (outsize > s.size() * 4) return s;
ret.resize(outsize);
// outsize is the number of bytes unused of the out-buffer
TORRENT_ASSERT(ret.size() >= outsize);
ret.resize(ret.size() - outsize);
return ret;
}