fixed bug in previous work-around

This commit is contained in:
Arvid Norberg 2010-03-08 02:55:16 +00:00
parent 723c59b6e8
commit 6e3882a197
1 changed files with 2 additions and 1 deletions

View File

@ -453,8 +453,9 @@ namespace libtorrent
std::string ret;
int target_size = lhs.size() + rhs.size() + 2;
ret.resize(target_size);
snprintf(&ret[0], target_size, "%s%s%s", lhs.c_str()
target_size = snprintf(&ret[0], target_size, "%s%s%s", lhs.c_str()
, (need_sep?TORRENT_SEPARATOR:""), rhs.c_str());
ret.resize(target_size);
return ret;
}